PluginProbe
Code Snippets / 3.9.6
Code Snippets v3.9.6
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 3.9.6, at css/common/_badges.scss

127 lines 2.2 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 @each $name, $colors in theme.$badges {
66 $text-color: #fff;
67 $background-color: list.nth($colors, 1);
68
69 @if list.length($colors) > 1 {
70 $text-color: list.nth($colors, 2);
71 }
72
73 .badge.#{$name}-badge,
74 .nav-tab-inactive:hover .badge.#{$name}-badge,
75 :hover > .inverted-badges .#{$name}-badge {
76 color: $text-color;
77 background-color: $background-color;
78 }
79
80 .badge.#{$name}-badge:hover {
81 color: $text-color;
82 background-color: color.adjust($background-color, $lightness: -5%);
83 }
84 }
85
86 .nav-tab-inactive .badge,
87 .inverted-badges .badge {
88 color: #fff;
89 background-color: #a7aaad;
90 border-color: #fff !important;
91
92 .dashicons {
93 color: #fff;
94 }
95 }
96
97 .nav-tab-inactive {
98 $colors: map.get(theme.$badges, 'pro');
99 $text-color: list.nth($colors, 2);
100 $background-color: list.nth($colors, 1);
101
102 .badge.pro-badge {
103 color: $text-color;
104 background-color: $background-color;
105 }
106
107 &:hover {
108 &.button, .dashicons-external {
109 color: #3c434a;
110 }
111
112 .badge.pro-badge {
113 color: $background-color;
114 background-color: $text-color;
115 }
116 }
117 }
118
119 .nav-tab-inactive {
120 background: transparent;
121 }
122
123 .nav-tab-button .dashicons-external {
124 font-size: 15px;
125 color: #666;
126 }
127