Skip to content
This repository has been archived by the owner on Apr 29, 2022. It is now read-only.

Commit

Permalink
adds better button focus styls
Browse files Browse the repository at this point in the history
  • Loading branch information
halmos committed Dec 10, 2019
1 parent 0dcb945 commit 6a6c421
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
7 changes: 3 additions & 4 deletions src/components/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ a.button {

&:focus {
outline: none;
& .button__contents {
box-shadow: 0px 0px 0px 3px rgba(0, 0, 0, 0.9);
}
}

&:hover {
Expand All @@ -36,7 +39,6 @@ a.button {
}
}

&:focus,
&:active {
& .button__contents {
background-color: var(--button-background-focus-color);
Expand All @@ -48,9 +50,6 @@ a.button {
}
}

&:active {
}

& .button__contents {
box-sizing: border-box;
display: flex;
Expand Down
3 changes: 1 addition & 2 deletions src/components/icon-button.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
&:focus {
outline: none;
& .icon-button__contents {
background-color: var(--ui-basic-font-color);
color: white;
box-shadow: 0px 0px 0px 3px rgba(0, 0, 0, 0.9);
}
}

Expand Down
10 changes: 8 additions & 2 deletions src/components/preprint-card.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
transition: all 0.1s;
overflow: hidden;
}
&:focus,
&:hover {
& .preprint-card__cta-button__contents {
background-color: var(--prereview-red);
Expand All @@ -81,15 +82,20 @@
height: 100%;
}
}
&:active,
&:focus {
&:active {
& .preprint-card__cta-button__contents {
background-color: var(--prereview-black);
& .preprint-card__count-label {
color: var(--prereview-white);
}
}
}
&:focus {
& .preprint-card__cta-button__contents {
background-color: var(--prereview-red);
box-shadow: 0px 0px 0px 3px rgba(0, 0, 0, 0.9);
}
}
}
& .preprint-card__score-panel {
box-sizing: border-box;
Expand Down
8 changes: 7 additions & 1 deletion src/components/welcome-modal.css
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,17 @@
white-space: pre;

margin-left: var(--lgrd);

&:any-link {
text-decoration: none;
color: var(--button-foreground-color--primary);
}
&:focus,

&:focus {
outline: none;
box-shadow: 0px 0px 0px 3px rgba(0, 0, 0, 0.9);
}

&:active {
outline: none;
background-color: var(--button-background-focus-color--primary);
Expand Down

0 comments on commit 6a6c421

Please sign in to comment.