Skip to content

Commit

Permalink
new focus
Browse files Browse the repository at this point in the history
  • Loading branch information
mi2ebi committed Dec 13, 2023
1 parent 4cacf9a commit bc6c0c0
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
--op-2: calc(2/15);
--link: 0, 105, 204;
--err: 209, 41, 41;
--focus: 255, 174, 12;
--sans: "IBM Plex Sans", ui-sans-serif, sans-serif;
--mono: "IBM Plex Mono", ui-monospace, monospace;
}
Expand Down Expand Up @@ -278,12 +279,13 @@ h2 {
font-size: 1rem;
}
/* hover/focus */
:is(a, summary, #fakebox):is(:hover, :focus-visible, :focus-within) {
background: rgba(var(--fg), var(--op-2));
outline: none;
:is(a, summary):is(:hover, :focus-visible), #fakebox:is(:hover, :focus-within) {
outline: 2px solid rgb(var(--focus));
background-color: rgba(var(--focus), var(--op-2));
}
#search:focus-visible {
#search:focus-visible, summary:has(a:hover):hover {
outline: none;
background: none;
}
.opt ::before {
content: "";
Expand All @@ -301,7 +303,8 @@ h2 {
}
.opt :is(:hover, :focus-visible)::before {
z-index: 1;
background: rgba(var(--fg), var(--op-2));
outline: 2px solid rgb(var(--focus));
background-color: rgba(var(--focus), var(--op-2));
}
/* dark mode */
:root.dark {
Expand All @@ -318,12 +321,6 @@ h2 {
--bg: 22, 10, 36;
--checked: 143, 72, 224;
}
:root.dark :is(a, summary, #fakebox):is(:hover, :focus-visible, :focus-within) {
background: rgba(var(--fg), var(--op-4));
}
:root.dark .opt :is(:hover, :focus-visible)::before {
background: rgba(var(--fg), var(--op-4));
}
/* other media queries */
@media (prefers-contrast: more) {
a, button, summary {
Expand Down

0 comments on commit bc6c0c0

Please sign in to comment.