diff options
author | Deniz Akşimşek <deniz@denizaksimsek.com> | 2024-08-30 01:41:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-30 01:41:20 +0300 |
commit | a97e2583415e79dd9a2b7816fd4eb587786211fa (patch) | |
tree | b2a5411852b8020f7a862bb07ec7de91514b2c16 | |
parent | 099b90abf85e8038007841261ee523bdf4935746 (diff) | |
parent | 9b452ff11a56a6f4add1d9f1d4622137e0bcf673 (diff) | |
download | missing-a97e2583415e79dd9a2b7816fd4eb587786211fa.tar.gz missing-a97e2583415e79dd9a2b7816fd4eb587786211fa.zip |
Merge pull request #59 from geoffrey-eisenbarth/anchor
Fix button.\<a\>.
-rw-r--r-- | src/components.css | 8 | ||||
-rw-r--r-- | src/core/sanitize.css | 2 | ||||
-rw-r--r-- | src/main.css | 30 |
3 files changed, 24 insertions, 16 deletions
diff --git a/src/components.css b/src/components.css index de73e22..961394a 100644 --- a/src/components.css +++ b/src/components.css @@ -183,14 +183,14 @@ details, padding-inline-start: 0; } - & a { + & :is(a:not(.\<button\>, .chip), .\<a\>) { font-weight: bold; text-decoration: none; padding-inline: .2em; - } - & a:hover, & a:focus { - text-decoration: underline; + &:hover, &:focus { + text-decoration: underline; + } } & [aria-current=page] { diff --git a/src/core/sanitize.css b/src/core/sanitize.css index 9906d65..f2c8f26 100644 --- a/src/core/sanitize.css +++ b/src/core/sanitize.css @@ -116,7 +116,7 @@ button, input, select { * Correct the inability to style buttons in iOS and Safari. */ -button, [type="button"], [type="reset"], [type="submit"] { +button, [type="button"], [type="reset"], [type="submit"]) { -webkit-appearance: button; } diff --git a/src/main.css b/src/main.css index 050b11f..eddac60 100644 --- a/src/main.css +++ b/src/main.css @@ -25,7 +25,7 @@ header, footer, section + section { } nav { - & a { + & :is(a:not(.\<button\>), .\<a\>) { text-decoration: none; color: var(--accent); } @@ -291,6 +291,7 @@ a, .\<a\> { background: none; border: none; font-size: 1em; + font-family: inherit; text-decoration: 1px dotted underline; .list-of-links & { @@ -484,11 +485,13 @@ label :is(input, select):not([specificity-hack]) { display: inline; padding-block: 0; } -button, -input[type="submit"], -input[type="reset"], -input[type="button"], -.\<button\>, +:where( + button, + input[type="submit"], + input[type="reset"], + input[type="button"], + .\<button\> +):not(.\<a\>), input::file-selector-button { display: inline-block; padding: 0 calc(var(--rhythm) / 4); @@ -512,6 +515,9 @@ input::file-selector-button { display: inline-flex; justify-content: center; align-items: center; + &:is(a) { + cursor: default; + } &:hover, &:focus-visible { filter: brightness(1.1); @@ -538,11 +544,13 @@ input::file-selector-button { } -button, -input[type="submit"], -input[type="reset"], -input[type="button"], -.\<button\> { +:where( + button, + input[type="submit"], + input[type="reset"], + input[type="button"], + .\<button\> +):not(.\<a\>) { &:active:is([aria-pressed], [aria-expanded]) { color: var(--accent); box-shadow: 0 1px 5px -1px var(--fg) inset; |