PluginProbe
Code Snippets / 4.0.0-beta.2
Code Snippets v4.0.0-beta.2
4.0.0-beta.2 3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 All 65 releases
code-snippets / css / common / _buttons.scss

_buttons.scss in Code Snippets 4.0.0-beta.2, at css/common/_buttons.scss

33 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 // A `<Button link>` renders as `.button.button-link` so it stays a real button
2 // for assistive tech, but it should read as inline text. WordPress 7.0 restyled
3 // `.wp-core-ui .button` to carry a border and radius, and its `.button-link`
4 // rules clear the background and padding but not the border — so a link-styled
5 // button draws a box around itself. The list table neutralises this for row
6 // actions; this covers everywhere else (modals, forms, sidebars). Specificity is
7 // one class above WP's own rule so it wins without `!important`.
8 .wp-core-ui .button.button-link {
9 border: 0;
10 border-radius: 0;
11 background: none;
12 box-shadow: none;
13 block-size: auto;
14 min-block-size: 0;
15 padding: 0;
16 line-height: inherit;
17 font-weight: 400;
18
19 // Keep a visible focus ring for keyboard users — the point is to remove the
20 // resting box, not the focus affordance.
21 &:focus-visible {
22 outline: 1px solid currentcolor;
23 outline-offset: 2px;
24 }
25
26 &:hover:not(:disabled),
27 &:active:not(:disabled) {
28 border: 0;
29 background: none;
30 box-shadow: none;
31 }
32 }
33