| 1 |
@use '../common/theme'; |
| 2 |
@use 'sass:map'; |
| 3 |
@use 'sass:list'; |
| 4 |
|
| 5 |
@mixin notices { |
| 6 |
.notice { |
| 7 |
border: 0; |
| 8 |
border-radius: 5px; |
| 9 |
display: flex; |
| 10 |
align-items: center; |
| 11 |
padding: 6px 10px; |
| 12 |
gap: 8px; |
| 13 |
margin: 0; |
| 14 |
|
| 15 |
.notice-dismiss { |
| 16 |
position: unset; |
| 17 |
margin-inline-start: auto; |
| 18 |
padding: 0; |
| 19 |
|
| 20 |
&, &::before { |
| 21 |
color: inherit; |
| 22 |
} |
| 23 |
} |
| 24 |
|
| 25 |
.wp-core-ui &.is-dismissible { |
| 26 |
position: unset; |
| 27 |
padding-inline-end: 10px; |
| 28 |
} |
| 29 |
} |
| 30 |
|
| 31 |
@each $name, $colors in theme.$notices { |
| 32 |
.notice-#{$name} { |
| 33 |
color: list.nth($colors, 2); |
| 34 |
background-color: list.nth($colors, 1); |
| 35 |
} |
| 36 |
} |
| 37 |
|
| 38 |
.notice-success::before { |
| 39 |
content: '✓'; |
| 40 |
font-weight: bold; |
| 41 |
font-size: 16px; |
| 42 |
} |
| 43 |
} |
| 44 |
|
| 45 |
|
| 46 |
.code-snippets-notice { |
| 47 |
.notice-dismiss { |
| 48 |
position: absolute; |
| 49 |
transform: initial; |
| 50 |
inset-inline-end: 0; |
| 51 |
inset-block-start: 0; |
| 52 |
} |
| 53 |
} |
| 54 |
|