PluginProbe
Code Snippets / 4.0.0-beta.1
Code Snippets v4.0.0-beta.1
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 / _badges.scss

_badges.scss in Code Snippets 4.0.0-beta.1, at css/common/_badges.scss

125 lines 2.1 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 @at-root .row-actions & {
24 color: #8c8c8c;
25 padding-inline: 0;
26 text-transform: capitalize;
27 font-weight: 500;
28 }
29
30 .dashicons {
31 font-size: 18px;
32 inline-size: 18px;
33 block-size: 18px;
34 }
35 }
36
37 .network-shared {
38 color: #2271b1;
39 font-size: 22px;
40 inline-size: 100%;
41 cursor: help;
42 }
43
44 .small-badge {
45 block-size: auto;
46 inline-size: auto;
47 font-size: smaller;
48 padding-block: 0;
49 padding-inline: 0.5em;
50 }
51
52 .wp-core-ui .button.nav-tab-button {
53 margin-inline-start: 0.5em;
54 float: inline-end;
55 color: #a7aaad;
56 background: #f6f7f7;
57 border-color: #f6f7f7;
58 align-self: center;
59 display: flex;
60 justify-content: center;
61 align-items: center;
62 gap: 2px;
63 }
64
65 .nav-tab-button .dashicons-external {
66 font-size: 15px;
67 color: #666;
68 }
69
70 @each $name, $colors in theme.$badges {
71 $text-color: #fff;
72 $background-color: list.nth($colors, 1);
73
74 @if list.length($colors) > 1 {
75 $text-color: list.nth($colors, 2);
76 }
77
78 .badge.#{$name}-badge,
79 .nav-tab-inactive:hover .badge.#{$name}-badge,
80 :hover > .inverted-badges .#{$name}-badge {
81 color: $text-color;
82 background-color: $background-color;
83 }
84
85 .badge.#{$name}-badge:hover {
86 color: $text-color;
87 background-color: color.adjust($background-color, $lightness: -5%);
88 }
89 }
90
91 .nav-tab-inactive .badge,
92 .inverted-badges .badge {
93 color: #fff;
94 background-color: #a7aaad;
95 border-color: #fff !important;
96
97 .dashicons {
98 color: #fff;
99 }
100 }
101
102 .nav-tab-inactive {
103 $colors: map.get(theme.$badges, 'pro');
104 $text-color: list.nth($colors, 2);
105 $background-color: list.nth($colors, 1);
106
107 background: transparent;
108
109 .badge.pro-badge {
110 color: $text-color;
111 background-color: $background-color;
112 }
113
114 &:hover {
115 &.button, .dashicons-external {
116 color: #3c434a;
117 }
118
119 .badge.pro-badge {
120 color: $background-color;
121 background-color: $text-color;
122 }
123 }
124 }
125