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

insights.scss in Code Snippets 4.0.0-beta.2, at css/insights.scss

240 lines 3.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 @use 'common/buttons';
2 @use 'common/theme';
3 @use 'common/toolbar';
4 @use 'common/wp-admin';
5 @use 'common/page-header';
6
7 #code-snippets-insights-container {
8 margin-block-start: 0;
9 }
10
11 .insights-chart-grid {
12 display: grid;
13 gap: 16px;
14 grid-template-columns: repeat(3, minmax(0, 1fr));
15 }
16
17 .insights-chart-card {
18 min-block-size: 220px;
19 box-sizing: border-box;
20 border: 1px solid var(--cs-color-border-subtle);
21 border-radius: var(--cs-card-radius);
22 background: var(--cs-color-surface);
23 color: var(--cs-color-text);
24 padding: 24px;
25
26 .insights-chart-card-header {
27 display: flex;
28 align-items: center;
29 justify-content: space-between;
30 gap: 16px;
31 margin-block-end: 20px;
32 }
33
34 h2 {
35 margin: 0;
36 font-size: 18px;
37 }
38 }
39
40 .insights-number-chart {
41 display: grid;
42 gap: 4px;
43 justify-items: center;
44 padding-block: 12px;
45 text-align: center;
46 }
47
48 .insights-number-chart-value {
49 font-size: 140px;
50 font-variant-numeric: tabular-nums;
51 line-height: 1;
52 }
53
54 .insights-number-chart-label {
55 color: var(--cs-color-text-muted);
56 font-size: 13px;
57 }
58
59 .insights-chart-view-toggle {
60 display: flex;
61 align-items: center;
62 gap: 8px;
63
64 .insights-chart-view-toggle-option {
65 display: flex;
66 align-items: center;
67 justify-content: center;
68 inline-size: 26px;
69 block-size: 26px;
70 box-sizing: border-box;
71 padding: 0;
72 margin: 0;
73 background: var(--cs-color-surface-muted);
74 color: var(--cs-color-text-muted);
75 border: none;
76 border-radius: 5px;
77 cursor: pointer;
78
79 > .dashicons {
80 font-size: 18px;
81
82 &.dashicons-chart-bar {
83 rotate: 90deg;
84 }
85 }
86
87 &:hover,
88 &:focus {
89 color: var(--cs-color-text);
90 }
91
92 &:focus-visible {
93 outline: 2px solid var(--cs-color-accent);
94 outline-offset: 2px;
95 }
96
97 &:focus:not(:focus-visible) {
98 outline: none;
99 }
100
101 &.active-view {
102 background: var(--cs-color-accent);
103 color: #fff;
104
105 &:hover,
106 &:focus {
107 color: #fff;
108 }
109 }
110 }
111 }
112
113 .insights-bar-chart,
114 .insights-pie-chart-legend {
115 padding: 0;
116 margin: 0;
117 list-style: none;
118 }
119
120 .insights-tags-cloud {
121 display: flex;
122 flex-wrap: wrap;
123 align-items: baseline;
124 gap: 8px 12px;
125 padding: 0;
126 margin: 0;
127 list-style: none;
128
129 li {
130 margin: 0;
131 line-height: 1.4;
132 }
133 }
134
135 .insights-chart-entry-link {
136 color: var(--cs-color-text);
137 text-decoration: none;
138
139 &:hover,
140 &:focus-visible {
141 color: var(--cs-color-accent);
142 box-shadow: none;
143 }
144
145 &:focus-visible {
146 outline: 2px solid var(--cs-color-accent);
147 outline-offset: 2px;
148 }
149 }
150
151 .insights-bar-chart {
152 display: grid;
153 gap: 10px;
154
155 li {
156 display: grid;
157 grid-template-columns: minmax(110px, 1fr) minmax(80px, 3fr) auto;
158 align-items: center;
159 gap: 10px;
160 margin: 0;
161 }
162
163 strong {
164 min-inline-size: 2ch;
165 text-align: end;
166 }
167 }
168
169 .insights-bar-track {
170 overflow: hidden;
171 block-size: 10px;
172 border-radius: 999px;
173 background: #e2e5e5;
174 }
175
176 .insights-bar-fill {
177 block-size: 100%;
178 border-radius: inherit;
179 }
180
181 .insights-pie-chart-content {
182 display: flex;
183 align-items: center;
184 gap: 24px;
185 }
186
187 .insights-pie-chart {
188 position: relative;
189 flex: 0 0 auto;
190 inline-size: 112px;
191 block-size: 112px;
192 border-radius: 50%;
193 background: #e2e5e5;
194
195 &::after {
196 position: absolute;
197 inset: 25px;
198 border-radius: 50%;
199 background: var(--cs-color-surface);
200 content: '';
201 }
202 }
203
204 .insights-pie-chart-legend {
205 display: grid;
206 gap: 12px;
207 inline-size: 100%;
208
209 li {
210 display: flex;
211 justify-content: space-between;
212 align-items: center;
213 gap: 16px;
214 margin: 0;
215 }
216
217 span {
218 display: flex;
219 align-items: center;
220 }
221
222 i {
223 display: inline-block;
224 inline-size: 10px;
225 block-size: 10px;
226 border-radius: 50%;
227 margin-inline-end: 8px;
228 }
229 }
230
231 @media (width <= 782px) {
232 .insights-chart-grid {
233 grid-template-columns: 1fr;
234 }
235
236 .insights-bar-chart li {
237 grid-template-columns: minmax(90px, 1fr) minmax(64px, 2fr) auto;
238 }
239 }
240