Make post status form use focused-style

This commit is contained in:
tusooa 2023-03-02 21:55:16 -05:00
parent 3a8de1e449
commit c1d6541901
No known key found for this signature in database
GPG Key ID: 7B467EDE43A08224
2 changed files with 19 additions and 4 deletions

View File

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

View File

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