PluginProbe
Code Snippets / trunk
Code Snippets vtrunk
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 / _notices.scss

_notices.scss in Code Snippets trunk, at css/common/_notices.scss

61 lines 966 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 @use 'sass:list';
2
3 $notices: (
4 success: #d3e9d3 #377a37,
5 warning: #f2ebc3 #b0730a,
6 error: #f8d7da #721c24,
7 info: #d2e6f4 #2b71a3,
8 neutral: #e2e5e5 #6c7e7e,
9 special: #dfc5ef #6e249c
10 );
11
12 @mixin notices($class: 'notice') {
13 .#{$class} {
14 border: 0;
15 border-radius: 5px;
16 display: flex;
17 align-items: center;
18 padding: 6px 10px;
19 gap: 8px;
20 margin: 0;
21
22 .#{$class}-dismiss {
23 position: unset;
24 margin-inline-start: auto;
25 padding: 0;
26
27 &, &::before {
28 color: inherit;
29 }
30 }
31
32 .wp-core-ui &.is-dismissible {
33 position: unset;
34 padding-inline-end: 10px;
35 }
36 }
37
38 @each $name, $colors in $notices {
39 .#{$class}-#{$name} {
40 color: list.nth($colors, 2);
41 background-color: list.nth($colors, 1);
42 }
43 }
44
45 .#{$class}-success::before {
46 content: '✓';
47 font-weight: bold;
48 font-size: 16px;
49 }
50 }
51
52
53 .code-snippets-notice {
54 .notice-dismiss {
55 position: absolute;
56 transform: initial;
57 inset-inline-end: 0;
58 inset-block-start: 0;
59 }
60 }
61