UX: Remove or replace button transitions with variable (#27527)

This commit is contained in:
chapoi
2024-06-20 19:51:20 +02:00
committed by GitHub
parent a67bb749a4
commit c1f477c1b6
13 changed files with 13 additions and 22 deletions

View File

@@ -232,7 +232,6 @@
margin: 1.5%; margin: 1.5%;
border: 1px solid var(--primary-low); border: 1px solid var(--primary-low);
flex: 1 1 28%; flex: 1 1 28%;
transition: box-shadow 0.25s;
min-width: 225px; min-width: 225px;
max-width: 550px; max-width: 550px;
a { a {

View File

@@ -8,7 +8,6 @@
color: var(--primary); color: var(--primary);
border: 1px solid var(--primary-medium); border: 1px solid var(--primary-medium);
font-size: var(--font-0); font-size: var(--font-0);
transition: none;
height: 100%; height: 100%;
&:focus { &:focus {
border-color: var(--tertiary); border-color: var(--tertiary);

View File

@@ -101,7 +101,7 @@ a.cancel {
margin-left: 1.25em; margin-left: 1.25em;
line-height: normal; line-height: normal;
color: var(--primary-high); color: var(--primary-high);
transition: color 250ms; transition: var(--d-button-transition);
&:hover { &:hover {
color: var(--danger); color: var(--danger);
} }

View File

@@ -47,8 +47,6 @@
color: var(--primary); color: var(--primary);
.discourse-no-touch & { .discourse-no-touch & {
transition: all 0.25s;
&:hover { &:hover {
box-shadow: var(--shadow-card); box-shadow: var(--shadow-card);
border-color: var(--primary-low-mid-or-secondary-high); border-color: var(--primary-low-mid-or-secondary-high);

View File

@@ -158,7 +158,6 @@
text-decoration: none; text-decoration: none;
cursor: pointer; cursor: pointer;
border: 1px solid transparent; border: 1px solid transparent;
transition: all linear 0.15s;
outline: none; outline: none;
img.avatar { img.avatar {
width: 2.1333em; width: 2.1333em;

View File

@@ -447,7 +447,6 @@
max-height: 80vh; max-height: 80vh;
.btn { .btn {
transition: none;
background-color: transparent; background-color: transparent;
margin-right: 5px; margin-right: 5px;
&:hover, &:hover,

View File

@@ -13,7 +13,6 @@
position: relative; position: relative;
border-bottom: var(--user-navigation__border-width) solid transparent; border-bottom: var(--user-navigation__border-width) solid transparent;
padding: calc(0.75em + var(--user-navigation__border-width)) 0.5em 0.75em; padding: calc(0.75em + var(--user-navigation__border-width)) 0.5em 0.75em;
transition: color 0.25s;
@include breakpoint(extra-large) { @include breakpoint(extra-large) {
font-size: var(--font-0); font-size: var(--font-0);

View File

@@ -31,12 +31,12 @@
rgba(0, 0, 0, 0) rgba(0, 0, 0, 0)
); );
border-radius: var(--d-button-border-radius); border-radius: var(--d-button-border-radius);
transition: background 0.25s, color 0.25s; transition: var(--d-button-transition);
cursor: pointer; cursor: pointer;
.d-icon { .d-icon {
color: $icon-color; color: $icon-color;
margin-right: 0.45em; margin-right: 0.45em;
transition: color 0.25s; transition: var(--d-button-transition);
// For Windows High Contrast (see whcm.scss for more) // For Windows High Contrast (see whcm.scss for more)
@media (forced-colors: active) { @media (forced-colors: active) {
color: ButtonText; color: ButtonText;
@@ -231,7 +231,7 @@
} }
&:hover, &:hover,
&:focus { &:focus {
color: currentColor; color: inherit;
} }
} }
@@ -302,10 +302,10 @@
background: transparent; background: transparent;
border: 0; border: 0;
line-height: var(--line-height-small); line-height: var(--line-height-small);
transition: background 0.25s, color 0.25s; transition: var(--d-button-transition);
.d-icon { .d-icon {
color: var(--primary-low-mid); color: var(--primary-low-mid);
transition: color 0.25s; transition: var(--d-button-transition);
} }
.discourse-no-touch & { .discourse-no-touch & {
&:hover, &:hover,
@@ -404,7 +404,7 @@
@mixin btn-colors($btn-color) { @mixin btn-colors($btn-color) {
color: var(--#{$btn-color}); color: var(--#{$btn-color});
.d-icon { .d-icon {
color: currentColor; color: inherit;
} }
&:focus, &:focus,
&:focus-visible { &:focus-visible {
@@ -430,14 +430,14 @@
&:focus-visible { &:focus-visible {
color: var(--tertiary-hover); color: var(--tertiary-hover);
.d-icon { .d-icon {
color: currentColor; color: inherit;
} }
} }
.discourse-no-touch & { .discourse-no-touch & {
&:hover { &:hover {
color: var(--tertiary-hover); color: var(--tertiary-hover);
.d-icon { .d-icon {
color: currentColor; color: inherit;
} }
} }
} }

View File

@@ -40,7 +40,7 @@
min-height: 30px; min-height: 30px;
display: flex; display: flex;
align-items: center; align-items: center;
transition: background-color 0.2s, color 0.2s; transition: var(--d-button-transition);
.d-icon { .d-icon {
margin-right: 5px; margin-right: 5px;

View File

@@ -182,7 +182,6 @@
bottom: 0.4em; bottom: 0.4em;
left: 0; left: 0;
opacity: 0.9; opacity: 0.9;
transition: all 0.25s;
z-index: 1; // needs to be higher than image z-index: 1; // needs to be higher than image
background: var(--secondary); background: var(--secondary);
color: var(--primary); color: var(--primary);

View File

@@ -15,6 +15,7 @@
--d-font-family--monospace: Consolas, Menlo, Monaco, "Lucida Console", --d-font-family--monospace: Consolas, Menlo, Monaco, "Lucida Console",
"Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono",
"Courier New", monospace; "Courier New", monospace;
--d-button-transition: none;
} }
// -------------------------------------------------- // --------------------------------------------------

View File

@@ -338,7 +338,7 @@ body.wizard {
font-size: var(--font-0); font-size: var(--font-0);
border: 0; border: 0;
padding: 0.5em; padding: 0.5em;
transition: background-color 0.3s; transition: var(--d-button-transition);
text-decoration: none; text-decoration: none;
background-color: var(--secondary); background-color: var(--secondary);
color: var(--primary-very-high); color: var(--primary-very-high);
@@ -534,7 +534,6 @@ body.wizard {
padding: 10px; padding: 10px;
background-color: var(--secondary); background-color: var(--secondary);
border: 1px solid var(--primary-low-mid); border: 1px solid var(--primary-low-mid);
transition: border-color 0.5s;
} }
&__dropdown { &__dropdown {

View File

@@ -37,7 +37,6 @@
margin-right: -1px; margin-right: -1px;
padding: 0.5em 0; padding: 0.5em 0;
width: 2.5em; width: 2.5em;
transition: background 0.2s, border-color 0.2s;
> * { > * {
pointer-events: none; pointer-events: none;
@@ -78,7 +77,7 @@
border-left-color: transparent; border-left-color: transparent;
padding: 0.5em 0; padding: 0.5em 0;
width: 2.5em; width: 2.5em;
transition: background 0.2s, border-color 0.2s; transition: var(--d-button-transition);
border-radius: var(--d-border-radius); border-radius: var(--d-border-radius);
border-top-left-radius: 0px; border-top-left-radius: 0px;
border-bottom-left-radius: 0px; border-bottom-left-radius: 0px;