Skip to content

Commit ee39b42

Browse files
committed
Add utility classes plus linting.
1 parent b4ddbd9 commit ee39b42

File tree

2 files changed

+79
-48
lines changed

2 files changed

+79
-48
lines changed

src/style.scss

+66-48
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ h1,
3636
h2,
3737
h3,
3838
h4 {
39-
text-wrap: balance;
39+
text-wrap: balance;
4040
}
4141

4242
/* Make bold styles look a bit nicer. */
@@ -87,18 +87,18 @@ select {
8787
/* Inline code and keyboard input styles. Need to explicitly exclude the Code block. */
8888
*:not(.wp-block-code) > code,
8989
kbd {
90-
background-color: var(--wp--preset--color--neutral-100);
91-
border-radius: 4px;
90+
background-color: var(--wp--preset--color--neutral-100);
91+
border-radius: 4px;
9292
color: var(--wp--preset--color--primary);
9393
font-family: var(--wp--preset--font-family--monospace);
94-
font-size: 0.8em;
95-
padding: 0.2rem 0.35rem;
96-
position: relative;
94+
font-size: 0.8em;
95+
padding: 0.2rem 0.35rem;
96+
position: relative;
9797
}
9898

9999
*.has-dark-code:not(.wp-block-code) code,
100100
.has-dark-code kbd {
101-
background-color: var(--wp--preset--color--primary-light);
101+
background-color: var(--wp--preset--color--primary-light);
102102
color: var(--wp--preset--color--neutral);
103103
}
104104

@@ -130,52 +130,63 @@ span.required {
130130

131131
/* Box Shadow */
132132
.box-shadow {
133-
&--small {
134-
box-shadow: var(--wp--preset--shadow--small);
135-
}
133+
&--small {
134+
box-shadow: var(--wp--preset--shadow--small);
135+
}
136136

137-
&--medium {
138-
box-shadow: var(--wp--preset--shadow--medium);
139-
}
137+
&--medium {
138+
box-shadow: var(--wp--preset--shadow--medium);
139+
}
140+
}
141+
142+
/* Text Wrap */
143+
.text-wrap {
144+
&--balance {
145+
text-wrap: balance;
146+
}
147+
148+
&--pretty {
149+
text-wrap: pretty;
150+
}
140151
}
141152

142153
/* Border */
143154
.border-radius {
144-
&--default {
145-
border-radius: var(--wp--custom--border-radius--default);
146-
overflow: hidden;
147-
}
155+
&--default {
156+
border-radius: var(--wp--custom--border-radius--default);
157+
overflow: hidden;
158+
}
148159

149160
&--button {
150-
border-radius: var(--wp--custom--border-radius--button);
151-
overflow: hidden;
152-
}
161+
border-radius: var(--wp--custom--border-radius--button);
162+
overflow: hidden;
163+
}
153164

154-
&--round {
155-
border-radius: var(--wp--custom--border-radius--round);
156-
overflow: hidden;
157-
}
165+
&--round {
166+
border-radius: var(--wp--custom--border-radius--round);
167+
overflow: hidden;
168+
}
158169
}
159170

160171
/* Links */
161172
.text-decoration--none {
162-
a {
163-
text-decoration-thickness: 0 !important;
164-
text-decoration: none !important;
165-
}
173+
a {
174+
text-decoration-thickness: 0 !important;
175+
text-decoration: none !important;
176+
}
166177
}
167178

168179
.has-hidden-links {
169-
a {
170-
text-decoration-thickness: 0 !important;
171-
text-decoration: none !important;
172-
173-
&:hover {
174-
text-decoration: underline !important;
175-
text-decoration-thickness: 1px !important;
176-
text-underline-offset: 0.5ch !important;
177-
}
178-
}
180+
a {
181+
text-decoration-thickness: 0 !important;
182+
text-decoration: none !important;
183+
184+
&:hover {
185+
text-decoration: underline !important;
186+
text-decoration-thickness: 1px !important;
187+
text-underline-offset: 0.5ch !important;
188+
}
189+
}
179190
}
180191

181192
a.has-arrow-right,
@@ -249,11 +260,11 @@ a.has-arrow-left,
249260

250261
/* Remove image border on mobile. */
251262
.has-no-mobile-border {
252-
img {
253-
@media (max-width: 782px) {
254-
border: none !important;
255-
}
256-
}
263+
img {
264+
@media (max-width: 782px) {
265+
border: none !important;
266+
}
267+
}
257268
}
258269

259270
/* Conditionally display content based on browser width. */
@@ -295,11 +306,18 @@ a.has-arrow-left,
295306

296307
/* Jetpack Social */
297308
.sd-like {
298-
margin-top: var(--wp--preset--spacing--large);
309+
margin-top: var(--wp--preset--spacing--large);
299310
}
300311

301312
.sd-title {
302-
display: none !important;
313+
display: none !important;
314+
}
315+
316+
/* Jetpack Subscriptions */
317+
.wp-block-jetpack-subscriptions {
318+
.wp-block-button__link {
319+
border-radius: var(--wp--custom--border-radius--button) !important
320+
}
303321
}
304322

305323
/* Jetpack VideoPress */
@@ -309,10 +327,10 @@ a.has-arrow-left,
309327

310328
/* Lightbox */
311329
.wp-lightbox-overlay .close-button:focus {
312-
outline: none;
330+
outline: none;
313331
}
314332

315333
.wp-lightbox-overlay .close-button svg {
316-
height: 24px;
317-
width: 24px;
334+
height: 24px;
335+
width: 24px;
318336
}

style.css

+13
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,14 @@ span.required {
128128
box-shadow: var(--wp--preset--shadow--medium);
129129
}
130130

131+
/* Text Wrap */
132+
.text-wrap--balance {
133+
text-wrap: balance;
134+
}
135+
.text-wrap--pretty {
136+
text-wrap: pretty;
137+
}
138+
131139
/* Border */
132140
.border-radius--default {
133141
border-radius: var(--wp--custom--border-radius--default);
@@ -265,6 +273,11 @@ a.has-arrow-left a::before,
265273
display: none !important;
266274
}
267275

276+
/* Jetpack Subscriptions */
277+
.wp-block-jetpack-subscriptions .wp-block-button__link {
278+
border-radius: var(--wp--custom--border-radius--button) !important;
279+
}
280+
268281
/* Jetpack VideoPress */
269282
.wp-block-jetpack-videopress {
270283
line-height: 0;

0 commit comments

Comments
 (0)