mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-23 15:36:58 +00:00
Enable dark mode for echo overlay
Bug: T366322 Depends-on: I01cdde979b2ddf64d54013466a3fe51a493860cc Change-Id: I90f2c3c5098a418a7e40204c9b2384711b6ddce3
This commit is contained in:
parent
08136cbf03
commit
781d532180
|
@ -1,15 +1,15 @@
|
|||
// = Echo variables
|
||||
@grey-light: #72777d;
|
||||
@grey-light: @color-placeholder;
|
||||
|
||||
@badge-padding: 0.12em;
|
||||
@badge-icon-size: 1.1em;
|
||||
@badge-distance-adjustment: 1em;
|
||||
|
||||
@notification-item-background-read: #eaecf0;
|
||||
@notification-item-background-read: @background-color-neutral;
|
||||
|
||||
@notification-background-unseen: #dce8ff;
|
||||
@notification-background-unread: @background-color-base;
|
||||
@notification-background-read: #eaecf0;
|
||||
@notification-background-read: @background-color-neutral;
|
||||
|
||||
@badge-counter-background-seen: @grey-light;
|
||||
|
||||
|
@ -32,4 +32,4 @@
|
|||
@specialpage-width: 1000px;
|
||||
/* stylelint-enable plugin/no-unsupported-browser-features */
|
||||
|
||||
@background-color-popup-confirmation: #202122;
|
||||
@background-color-popup-confirmation: @color-notice;
|
||||
|
|
|
@ -117,7 +117,7 @@ ul.mw-echo-special-notifications {
|
|||
overflow-y: auto;
|
||||
|
||||
.mw-echo-notification {
|
||||
background-color: #f8f9fa;
|
||||
background-color: @background-color-neutral-subtle;
|
||||
|
||||
&:hover {
|
||||
background-color: #eaecf0;
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
&-group {
|
||||
cursor: default;
|
||||
padding: @bundle-group-padding;
|
||||
background-color: #f8f9fa;
|
||||
background-color: @background-color-neutral-subtle;
|
||||
box-shadow: inset 0 2px 0 0 rgba( 0, 0, 0, 0.05 );
|
||||
}
|
||||
|
||||
|
|
|
@ -25,22 +25,33 @@
|
|||
cursor: inherit;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
background-color: #ececec;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
text-decoration: none;
|
||||
box-shadow: @box-shadow-inset-medium @box-shadow-color-progressive--focus;
|
||||
outline: @outline-base--focus;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
// FIXME: Non-standard design token. Replace with a standard token and revise skin-theme rules.
|
||||
background-color: #ececec;
|
||||
|
||||
.skin-theme-clientpref-night & {
|
||||
background-color: @background-color-interactive-subtle;
|
||||
}
|
||||
|
||||
.skin-theme-clientpref-os & {
|
||||
@media ( prefers-color-scheme: dark ) {
|
||||
background-color: @background-color-interactive-subtle;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-unread {
|
||||
background-color: @background-color-base;
|
||||
|
||||
&:hover {
|
||||
background-color: #f8f9fa;
|
||||
background-color: @background-color-interactive-subtle;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -39,10 +39,18 @@
|
|||
} );
|
||||
|
||||
let $icon;
|
||||
const iconUrl = this.model.getIconURL();
|
||||
// Icon
|
||||
if ( this.model.getIconURL() ) {
|
||||
if ( iconUrl ) {
|
||||
// Only invert non colored images
|
||||
/* eslint-disable es-x/no-array-prototype-includes */
|
||||
const invertIconClass =
|
||||
iconUrl.includes( 'progressive' ) ||
|
||||
iconUrl.includes( 'constructive' ) ||
|
||||
iconUrl.includes( 'failure' ) ? '' : 'skin-invert';
|
||||
/* eslint-disable-next-line mediawiki/class-doc */
|
||||
$icon = $( '<div>' )
|
||||
.addClass( 'mw-echo-ui-notificationItemWidget-icon' )
|
||||
.addClass( `mw-echo-ui-notificationItemWidget-icon ${ invertIconClass }` )
|
||||
.append( $( '<img>' ).attr( {
|
||||
src: this.model.getIconURL(),
|
||||
role: 'presentation',
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
* @property {jQuery}
|
||||
*/
|
||||
$overlay: $( '<div>' )
|
||||
.addClass( 'mw-echo-ui-overlay notheme' )
|
||||
.addClass( 'mw-echo-ui-overlay' )
|
||||
};
|
||||
}() );
|
||||
|
|
Loading…
Reference in a new issue