| 1 |
|
| 2 |
#adminmenu { |
| 3 |
.toplevel_page_snippets div.wp-menu-image::before { |
| 4 |
content: ''; |
| 5 |
mask-image: url('../assets/menu-icon.svg'); |
| 6 |
mask-repeat: no-repeat; |
| 7 |
mask-position: center; |
| 8 |
background-color: currentcolor; |
| 9 |
} |
| 10 |
|
| 11 |
.code-snippets-upgrade-button { |
| 12 |
color: #fff; |
| 13 |
background-color: #d46f4d; |
| 14 |
border: none; |
| 15 |
|
| 16 |
// WP 7.0 restyles `.button`/`.button-primary` with wider padding, a 2px radius and a |
| 17 |
// 40px min-height; pin these (independent of the plugin control tokens, which are |
| 18 |
// sized for page content rather than the admin menu) so the pill keeps its compact |
| 19 |
// dimensions and stays aligned with the surrounding submenu items across WP versions. |
| 20 |
border-radius: 3px; |
| 21 |
padding-block: 0; |
| 22 |
padding-inline: 10px; |
| 23 |
min-block-size: 30px; |
| 24 |
block-size: auto; |
| 25 |
text-align: center; |
| 26 |
font-weight: bold; |
| 27 |
transition: background-color .1s linear; |
| 28 |
white-space: break-spaces; |
| 29 |
line-height: inherit; |
| 30 |
display: flex; |
| 31 |
justify-content: center; |
| 32 |
align-items: center; |
| 33 |
|
| 34 |
@media (prefers-reduced-motion: reduce) { |
| 35 |
transition-duration: 0.01s; |
| 36 |
} |
| 37 |
|
| 38 |
&:hover { |
| 39 |
background-color: #0ca0a9; |
| 40 |
} |
| 41 |
|
| 42 |
.dashicons { |
| 43 |
vertical-align: text-bottom; |
| 44 |
color: inherit; |
| 45 |
font-size: 16px; |
| 46 |
padding-block-start: 2px; |
| 47 |
|
| 48 |
// WP 7.0's taller button line-height (≈38px) leaks onto the icon and pushes it out |
| 49 |
// of alignment; reset it so the glyph stays centred within the flex pill. |
| 50 |
line-height: 1; |
| 51 |
} |
| 52 |
} |
| 53 |
|
| 54 |
.wp-submenu a[href='admin.php?page=code_snippets_upgrade']='admin.php?page=code_snippets_upgrade']:hover { |
| 55 |
box-shadow: none; |
| 56 |
} |
| 57 |
} |
| 58 |
|