[Glitch] Improve hover and focus style in columns settings

Port 900481b7fa to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
pull/1616/head
Mélanie Chauvel 2021-10-01 00:55:51 +02:00 committed by Claire
parent 079ed6c26d
commit cef109e046
4 changed files with 32 additions and 13 deletions

View File

@ -124,8 +124,8 @@ class ColumnHeader extends React.PureComponent {
moveButtons = (
<div key='move-buttons' className='column-header__setting-arrows'>
<button title={formatMessage(messages.moveLeft)} aria-label={formatMessage(messages.moveLeft)} className='text-btn column-header__setting-btn' onClick={this.handleMoveLeft}><Icon id='chevron-left' /></button>
<button title={formatMessage(messages.moveRight)} aria-label={formatMessage(messages.moveRight)} className='text-btn column-header__setting-btn' onClick={this.handleMoveRight}><Icon id='chevron-right' /></button>
<button title={formatMessage(messages.moveLeft)} aria-label={formatMessage(messages.moveLeft)} className='icon-button column-header__setting-btn' onClick={this.handleMoveLeft}><Icon id='chevron-left' /></button>
<button title={formatMessage(messages.moveRight)} aria-label={formatMessage(messages.moveRight)} className='icon-button column-header__setting-btn' onClick={this.handleMoveRight}><Icon id='chevron-right' /></button>
</div>
);
} else if (multiColumn && this.props.onPin) {
@ -146,8 +146,8 @@ class ColumnHeader extends React.PureComponent {
];
if (multiColumn) {
collapsedContent.push(moveButtons);
collapsedContent.push(pinButton);
collapsedContent.push(moveButtons);
}
if (children || (multiColumn && this.props.onPin)) {

View File

@ -437,12 +437,17 @@
}
.column-header__setting-btn {
&:hover {
&:hover,
&:focus {
color: $darker-text-color;
text-decoration: underline;
}
}
.column-header__collapsible__extra + .column-header__setting-btn {
padding-top: 5px;
}
.column-header__permission-btn {
display: inline;
font-weight: inherit;
@ -453,10 +458,15 @@
float: right;
.column-header__setting-btn {
padding: 0 10px;
padding: 5px;
&:first-child {
padding-right: 7px;
}
&:last-child {
padding-right: 0;
padding-left: 7px;
margin-left: 5px;
}
}
}

View File

@ -829,7 +829,7 @@
transition: background-color 0.2s ease;
}
.react-toggle:hover:not(.react-toggle--disabled) .react-toggle-track {
.react-toggle:is(:hover, :focus-within):not(.react-toggle--disabled) .react-toggle-track {
background-color: darken($ui-base-color, 10%);
}
@ -837,7 +837,7 @@
background-color: $ui-highlight-color;
}
.react-toggle--checked:hover:not(.react-toggle--disabled) .react-toggle-track {
.react-toggle--checked:is(:hover, :focus-within):not(.react-toggle--disabled) .react-toggle-track {
background-color: lighten($ui-highlight-color, 10%);
}

View File

@ -112,6 +112,20 @@ body.rtl {
.column-header__setting-arrows {
float: left;
.column-header__setting-btn {
&:first-child {
padding-left: 7px;
padding-right: 5px;
}
&:last-child {
padding-right: 7px;
padding-left: 5px;
margin-right: 5px;
margin-left: 0;
}
}
}
.setting-toggle__label {
@ -428,11 +442,6 @@ body.rtl {
margin-left: 5px;
}
.column-header__setting-arrows .column-header__setting-btn:last-child {
padding-left: 0;
padding-right: 10px;
}
.simple_form .input.radio_buttons .radio > label input {
left: auto;
right: 0;