Compare commits

...

3 Commits

Author SHA1 Message Date
tusooa c1d6541901
Make post status form use focused-style 2023-03-02 21:55:16 -05:00
tusooa 3a8de1e449
Make interaction buttons use focused-style 2023-03-02 21:39:39 -05:00
tusooa 090f4b854e
Make ChatListItem use focused-style 2023-03-02 21:27:36 -05:00
9 changed files with 58 additions and 26 deletions

View File

@ -16,3 +16,15 @@
@content; @content;
} }
} }
@mixin focused-style-with($selectors...) {
@include focused-style {
@content;
}
@each $selector in $selectors {
#{$selector} {
@content;
}
}
}

View File

@ -1,3 +1,5 @@
@import "src/mixins";
.chat-list-item { .chat-list-item {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -7,11 +9,11 @@
box-sizing: border-box; box-sizing: border-box;
cursor: pointer; cursor: pointer;
:focus { @include unfocused-style {
outline: none; outline: none;
} }
&:hover { @include focused-style {
background-color: var(--selectedPost, $fallback--lightBg); background-color: var(--selectedPost, $fallback--lightBg);
box-shadow: 0 0 3px 1px rgb(0 0 0 / 10%); box-shadow: 0 0 3px 1px rgb(0 0 0 / 10%);
} }
@ -63,13 +65,15 @@
pointer-events: none; pointer-events: none;
} }
&:hover .animated.avatar { @include focused-style {
canvas { .animated.avatar {
display: none; canvas {
} display: none;
}
img { img {
visibility: visible; visibility: visible;
}
} }
} }

View File

@ -1,6 +1,7 @@
<template> <template>
<div <div
class="chat-list-item" class="chat-list-item"
tabindex="0"
@click.capture.prevent="openChat" @click.capture.prevent="openChat"
> >
<div class="chat-list-item-left"> <div class="chat-list-item-left">

View File

@ -192,11 +192,6 @@
position: static; position: static;
padding: 10px; padding: 10px;
margin: -10px; margin: -10px;
&:hover .svg-inline--fa {
color: $fallback--text;
color: var(--text, $fallback--text);
}
} }
.popover-trigger-button { .popover-trigger-button {
@ -213,6 +208,11 @@
.focus-marker { .focus-marker {
visibility: visible; visibility: visible;
} }
.svg-inline--fa {
color: $fallback--text;
color: var(--text, $fallback--text);
}
} }
} }
} }

View File

@ -86,7 +86,6 @@
animation-duration: 0.6s; animation-duration: 0.6s;
} }
&:hover .svg-inline--fa,
&.-favorited .svg-inline--fa { &.-favorited .svg-inline--fa {
color: $fallback--cOrange; color: $fallback--cOrange;
color: var(--cOrange, $fallback--cOrange); color: var(--cOrange, $fallback--cOrange);
@ -103,6 +102,11 @@
} }
@include focused-style { @include focused-style {
.svg-inline--fa {
color: $fallback--cOrange;
color: var(--cOrange, $fallback--cOrange);
}
.focus-marker { .focus-marker {
visibility: visible; visibility: visible;
} }

View File

@ -88,6 +88,9 @@
> >
<a <a
class="preview-toggle faint" class="preview-toggle faint"
role="button"
tabindex="0"
:aria-expanded="showPreview"
@click.stop.prevent="togglePreview" @click.stop.prevent="togglePreview"
> >
{{ $t('post_status.preview') }} {{ $t('post_status.preview') }}
@ -346,6 +349,7 @@
<style lang="scss"> <style lang="scss">
@import "../../variables"; @import "../../variables";
@import "src/mixins";
.post-status-form { .post-status-form {
position: relative; position: relative;
@ -389,7 +393,7 @@
cursor: pointer; cursor: pointer;
user-select: none; user-select: none;
&:hover { @focused-style {
text-decoration: underline; text-decoration: underline;
} }
@ -470,8 +474,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
&.selected, @include focused-style-with("&.selected") {
&:hover {
// needs to be specific to override icon default color // needs to be specific to override icon default color
svg, svg,
i, i,
@ -488,7 +491,7 @@
color: $fallback--icon; color: $fallback--icon;
color: var(--btnDisabledText, $fallback--icon); color: var(--btnDisabledText, $fallback--icon);
&:hover { @include focused-style {
color: $fallback--icon; color: $fallback--icon;
color: var(--btnDisabledText, $fallback--icon); color: var(--btnDisabledText, $fallback--icon);
} }

View File

@ -121,7 +121,7 @@
line-height: 1.5; line-height: 1.5;
align-content: center; align-content: center;
&:hover { @include focused-style {
transform: scale(1.25); transform: scale(1.25);
} }
} }
@ -130,11 +130,6 @@
.popover-trigger { .popover-trigger {
padding: 10px; padding: 10px;
margin: -10px; margin: -10px;
&:hover .svg-inline--fa {
color: $fallback--text;
color: var(--text, $fallback--text);
}
} }
.popover-trigger-button { .popover-trigger-button {
@ -151,6 +146,11 @@
.focus-marker { .focus-marker {
visibility: visible; visibility: visible;
} }
.svg-inline--fa {
color: $fallback--text;
color: var(--text, $fallback--text);
}
} }
} }
} }

View File

@ -76,7 +76,6 @@
} }
.interactive { .interactive {
&:hover .svg-inline--fa,
&.-active .svg-inline--fa { &.-active .svg-inline--fa {
color: $fallback--cBlue; color: $fallback--cBlue;
color: var(--cBlue, $fallback--cBlue); color: var(--cBlue, $fallback--cBlue);
@ -89,6 +88,11 @@
} }
@include focused-style { @include focused-style {
.svg-inline--fa {
color: $fallback--cBlue;
color: var(--cBlue, $fallback--cBlue);
}
.focus-marker { .focus-marker {
visibility: visible; visibility: visible;
} }

View File

@ -105,7 +105,6 @@
animation-duration: 0.6s; animation-duration: 0.6s;
} }
&:hover .svg-inline--fa,
&.-repeated .svg-inline--fa { &.-repeated .svg-inline--fa {
color: $fallback--cGreen; color: $fallback--cGreen;
color: var(--cGreen, $fallback--cGreen); color: var(--cGreen, $fallback--cGreen);
@ -122,6 +121,11 @@
} }
@include focused-style { @include focused-style {
.svg-inline--fa {
color: $fallback--cGreen;
color: var(--cGreen, $fallback--cGreen);
}
.focus-marker { .focus-marker {
visibility: visible; visibility: visible;
} }