| 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 |
|