PluginProbe
Code Snippets / 3.10.0-beta.1
Code Snippets v3.10.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 / _toolbar.scss

_toolbar.scss in Code Snippets 3.10.0-beta.1, at css/common/_toolbar.scss

209 lines 3.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 @use 'theme';
2 @use 'upsell';
3
4 $toolbar-block-size: 136px;
5 $wpcontent-inline-start-indent: 20px;
6
7 #wpbody {
8 padding-block-start: $toolbar-block-size;
9 }
10
11 .code-snippets-toolbar {
12 color: #2c3337;
13 background: #fff;
14 font-family: 'SF Pro', sans-serif;
15 margin-inline-start: -$wpcontent-inline-start-indent - 2;
16 position: absolute;
17 inline-size: calc(100% + $wpcontent-inline-start-indent);
18 block-size: $toolbar-block-size;
19 inset-block-start: 0;
20 display: flex;
21 flex-direction: column;
22
23 ul, li {
24 margin: 0;
25 padding: 0;
26 list-style: none;
27 }
28 }
29
30 .code-snippets-toolbar-upper {
31 justify-content: space-between;
32 block-size: 76px;
33 box-sizing: border-box;
34 padding-block: 16px;
35 padding-inline: 24px;
36 border-block-end: 1px solid rgb(195 196 199 / 50%);
37 display: flex;
38 align-items: center;
39
40 .logo {
41 display: flex;
42 align-items: center;
43 gap: 8px;
44
45 img {
46 block-size: 42px;
47 }
48
49 div {
50 font-size: 18px;
51 font-weight: 700;
52 }
53 }
54
55 h1 {
56 font-size: 18px;
57 font-weight: 700;
58 line-height: 1.5;
59 }
60
61 ul {
62 display: flex;
63 gap: 22px;
64 align-items: center;
65 }
66
67 a {
68 color: inherit;
69 text-decoration: none;
70 }
71 }
72
73 .code-snippets-toolbar-lower {
74 border-block-end: 1px solid #e2e2e4;
75 block-size: 60px;
76 box-sizing: border-box;
77
78 nav,
79 ul {
80 block-size: 100%;
81 }
82
83 ul {
84 display: flex;
85 align-items: stretch;
86 }
87
88 li {
89 display: flex;
90 }
91
92 // Items fill the 60px band; the active tab is indicated by accent colour on
93 // its icon and label, with no underline.
94 li a {
95 display: flex;
96 margin: 0;
97 block-size: 100%;
98 padding-block: 0;
99 padding-inline: 24px;
100 color: #2c3337;
101 gap: 12px;
102 align-items: center;
103 font-size: 16px;
104 font-weight: 600;
105 letter-spacing: -0.16px;
106 text-decoration: none;
107 box-sizing: border-box;
108 cursor: pointer;
109
110 svg {
111 inline-size: 26px;
112 block-size: 26px;
113 }
114
115 &.active-link, &:hover, &:focus, &:active {
116 color: theme.$accent;
117 }
118 }
119
120 li:not(.toolbar-end-item) + li.toolbar-end-item {
121 margin-inline-start: auto;
122 }
123
124 // Narrow widths: centre each item's label directly beneath its icon and
125 // shrink the type so the nav still fits on one row. The pro chip becomes a
126 // small badge pinned to the item's top corner, out of the flow so it never
127 // shifts the icon off-centre from its label. Below 782px the row scrolls
128 // sideways (see the mobile block below) rather than wrapping.
129 @media (width <= 1140px) {
130 li a {
131 position: relative;
132 flex-direction: column;
133 justify-content: center;
134 align-items: center;
135 gap: 4px;
136 padding-inline: 14px;
137 font-size: 13px;
138 text-align: center;
139
140 .pro-chip {
141 position: absolute;
142 inset-block-start: 7px;
143 inset-inline-end: 4px;
144 padding-block: 1px;
145 padding-inline: 5px;
146 font-size: 8px;
147 line-height: normal;
148 }
149 }
150 }
151
152 // Mobile: the primary navigation scrolls horizontally on its band rather
153 // than wrapping, with the scrollbar chrome hidden.
154 @media (width <= 782px) {
155 overflow-x: auto;
156 scrollbar-width: none;
157
158 &::-webkit-scrollbar {
159 display: none;
160 }
161
162 ul {
163 flex-wrap: nowrap;
164 }
165
166 li a {
167 white-space: nowrap;
168 }
169 }
170 }
171
172 .code-snippets-toolbar-upper li a.active-link,
173 .code-snippets-toolbar-upper li a:hover,
174 .code-snippets-toolbar-upper li a:focus,
175 .code-snippets-toolbar-upper li a:active {
176 color: theme.$accent;
177 }
178
179 .code-snippets-toolbar-lower .pro-chip,
180 .nav-tab .pro-chip,
181 .snippet-type-link .pro-chip {
182 color: theme.$accent;
183 background: #eff5f9;
184 border: 1px solid rgb(34 113 177 / 10%);
185 text-transform: uppercase;
186 border-radius: 999px;
187 display: flex;
188 justify-content: center;
189 align-items: center;
190 box-sizing: border-box;
191 padding: 5px 12px;
192 font-weight: 700;
193 line-height: 1;
194 }
195
196
197 .code-snippets-toolbar-lower .pro-chip {
198 font-size: 12px;
199 }
200
201 .nav-tab .pro-chip,
202 .snippet-type-link .pro-chip {
203 font-size: 10px;
204 }
205
206 .code-snippets-return-link {
207 float: inline-end;
208 }
209