PluginProbe
Code Snippets / 3.7.0
Code Snippets v3.7.0
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 3.0.1 All 64 releases
code-snippets / css / common / _badges.scss

_badges.scss in Code Snippets 3.7.0, at css/common/_badges.scss

108 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 @use 'sass:map';
2 @use 'sass:list';
3 @use 'sass:color';
4 @use 'theme';
5
6 .badge {
7 font-size: 12px;
8 font-weight: 700;
9 text-transform: uppercase;
10 border-radius: 3px;
11 text-align: center;
12 min-inline-size: 43px;
13 min-block-size: 24px;
14 display: inline-flex;
15 justify-content: center;
16 align-items: center;
17 padding-block: 0;
18 padding-inline: 3px;
19 box-sizing: border-box;
20 gap: 5px;
21 line-height: 1;
22
23 .dashicons {
24 font-size: 18px;
25 inline-size: 18px;
26 block-size: 18px;
27 }
28 }
29
30 .small-badge {
31 block-size: auto;
32 inline-size: auto;
33 font-size: smaller;
34 padding-block: 0;
35 padding-inline: 0.5em;
36 }
37
38 .wp-core-ui .button.nav-tab-button {
39 margin-inline-start: 0.5em;
40 float: inline-end;
41 color: #a7aaad;
42 background: #f6f7f7;
43 border-color: #f6f7f7;
44 align-self: center;
45 display: flex;
46 justify-content: center;
47 align-items: center;
48 gap: 2px;
49 }
50
51 @each $name, $colors in theme.$badges {
52 $text-color: #fff;
53 $background-color: list.nth($colors, 1);
54
55 @if list.length($colors) > 1 {
56 $text-color: list.nth($colors, 2);
57 }
58
59 .badge.#{$name}-badge,
60 .nav-tab-inactive:hover .badge.#{$name}-badge,
61 :hover > .inverted-badges .#{$name}-badge {
62 color: $text-color;
63 background-color: $background-color;
64 }
65
66 .badge.#{$name}-badge:hover {
67 color: $text-color;
68 background-color: color.adjust($background-color, $lightness: -5%);
69 }
70 }
71
72 .nav-tab-inactive .badge,
73 .inverted-badges .badge {
74 color: #fff;
75 background-color: #a7aaad;
76 }
77
78 .nav-tab-inactive {
79 $colors: map.get(theme.$badges, 'pro');
80 $text-color: list.nth($colors, 2);
81 $background-color: list.nth($colors, 1);
82
83 .badge.pro-badge {
84 color: $text-color;
85 background-color: $background-color;
86 }
87
88 &:hover {
89 &.button, .dashicons-external {
90 color: #3c434a;
91 }
92
93 .badge.pro-badge {
94 color: $background-color;
95 background-color: $text-color;
96 }
97 }
98 }
99
100 .nav-tab-inactive {
101 background: transparent;
102 }
103
104 .nav-tab-button .dashicons-external {
105 font-size: 15px;
106 color: #666;
107 }
108