diff --git a/src/components/badge.style.js b/src/components/badge.style.js index 37833cdb0..0697cac6c 100644 --- a/src/components/badge.style.js +++ b/src/components/badge.style.js @@ -9,6 +9,12 @@ export default { notification: '.-notification' }, defaultRules: [ + { + component: 'Root', + directives: { + '--badgeNotification': 'color | --cRed' + } + }, { directives: { background: '--cGreen' diff --git a/src/components/chat_message/chat_message.scss b/src/components/chat_message/chat_message.scss index 18eb610b7..f7254ea35 100644 --- a/src/components/chat_message/chat_message.scss +++ b/src/components/chat_message/chat_message.scss @@ -1,5 +1,3 @@ -@import "../../variables"; - .chat-message-wrapper { &.hovered-message-chain { .animated.Avatar { @@ -93,8 +91,7 @@ .error { .status-content.media-body, .created-at { - color: $fallback--cRed; - color: var(--badgeNotification, $fallback--cRed); + color: var(--badgeNotification); } } @@ -146,6 +143,5 @@ margin: 1.4em 0; font-size: 0.9em; user-select: none; - color: $fallback--text; - color: var(--faintedText, $fallback--text); + color: var(--textFaint); } diff --git a/src/components/root.style.js b/src/components/root.style.js index 53777a4bf..40c53172a 100644 --- a/src/components/root.style.js +++ b/src/components/root.style.js @@ -15,9 +15,23 @@ export default { defaultRules: [ { directives: { + // These are here just to establish order, + // themes should override those + '--bg': 'color | #121a24', + '--fg': 'color | #182230', + '--text': 'color | #b9b9ba', + '--link': 'color | #d8a070', + '--cRed': 'color | #FF0000', + '--cBlue': 'color | #0095ff', + '--cGreen': 'color | #0fa00f', + '--cOrange': 'color | #ffa500', + + // Fonts '--font': 'generic | sans-serif', '--monoFont': 'generic | monospace', - '--bg': 'color | #000000', // just to establish order + + // Fallback no-background-image color + // (also useful in some other places like scrollbars) '--wallpaper': 'color | --bg, -2' } } diff --git a/src/components/tab_switcher/tab.style.js b/src/components/tab_switcher/tab.style.js index bf4a4ea53..eac8aaeb5 100644 --- a/src/components/tab_switcher/tab.style.js +++ b/src/components/tab_switcher/tab.style.js @@ -3,7 +3,7 @@ export default { selector: '.tab', // CSS selector/prefix states: { active: '.active', - hover: ':hover:not(:disabled)', + hover: ':hover:not(.disabled)', disabled: '.disabled' }, validInnerComponents: [ @@ -24,11 +24,16 @@ export default { shadow: ['--defaultButtonHoverGlow', '--defaultButtonBevel'] } }, + { + state: ['active'], + directives: { + opacity: 0 + } + }, { state: ['hover', 'active'], directives: { - shadow: ['--defaultButtonShadow', '--defaultButtonBevel'], - opacity: 0 + shadow: ['--defaultButtonShadow', '--defaultButtonBevel'] } }, { @@ -38,12 +43,6 @@ export default { shadow: ['--defaultButtonBevel'] } }, - { - state: ['active'], - directives: { - opacity: 0 - } - }, { component: 'Text', parent: { diff --git a/src/components/user_card/user_card.scss b/src/components/user_card/user_card.scss index a1ac81a68..6dba34994 100644 --- a/src/components/user_card/user_card.scss +++ b/src/components/user_card/user_card.scss @@ -62,11 +62,6 @@ padding: 1em; margin: 0; - a { - color: $fallback--link; - color: var(--postLink, $fallback--link); - } - img { object-fit: contain; vertical-align: middle; @@ -76,36 +71,31 @@ } &.-rounded-t { - border-top-left-radius: $fallback--panelRadius; - border-top-left-radius: var(--panelRadius, $fallback--panelRadius); - border-top-right-radius: $fallback--panelRadius; - border-top-right-radius: var(--panelRadius, $fallback--panelRadius); + border-top-left-radius: var(--roundness); + border-top-right-radius: var(--roundness); - --__roundnessTop: var(--panelRadius); + --__roundnessTop: var(--roundness); --__roundnessBottom: 0; } &.-rounded { - border-radius: $fallback--panelRadius; - border-radius: var(--panelRadius, $fallback--panelRadius); + border-radius: var(--roundness); - --__roundnessTop: var(--panelRadius); - --__roundnessBottom: var(--panelRadius); + --__roundnessTop: var(--roundness); + --__roundnessBottom: var(--roundness); } &.-popover { - border-radius: $fallback--tooltipRadius; - border-radius: var(--tooltipRadius, $fallback--tooltipRadius); + border-radius: var(--roundness); - --__roundnessTop: var(--tooltipRadius); - --__roundnessBottom: var(--tooltipRadius); + --__roundnessTop: var(--roundness); + --__roundnessBottom: var(--roundness); } &.-bordered { border-width: 1px; border-style: solid; - border-color: $fallback--border; - border-color: var(--border, $fallback--border); + border-color: var(--border); } } @@ -176,8 +166,7 @@ padding: 0.5em 0; &:not(:hover) .icon { - color: $fallback--lightText; - color: var(--lightText, $fallback--lightText); + color: var(--lightText); } } @@ -191,6 +180,7 @@ } .user-screen-name { + color: var(--text); min-width: 1px; flex: 0 1 auto; text-overflow: ellipsis; @@ -202,16 +192,11 @@ flex: 0 0 auto; margin-left: 1em; font-size: 0.7em; - color: $fallback--text; - color: var(--text, $fallback--text); + color: var(--text); } .user-role { flex: none; - color: $fallback--text; - color: var(--alertNeutralText, $fallback--text); - background-color: $fallback--fg; - background-color: var(--alertNeutral, $fallback--fg); } } diff --git a/src/components/user_card/user_card.style.js b/src/components/user_card/user_card.style.js index a6190f592..34eaa1769 100644 --- a/src/components/user_card/user_card.style.js +++ b/src/components/user_card/user_card.style.js @@ -15,6 +15,7 @@ export default { { directives: { background: '--bg', + opacity: 0, roundness: 3, shadow: [{ x: 1, diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index e1c28cb61..0f627f62f 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -113,19 +113,19 @@