Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 05d0270

Browse files
authored
Merge pull request #159 from geotrev/framework/classes
Update text utility classes for consistency
2 parents 4eecab7 + fcdb5df commit 05d0270

File tree

2 files changed

+25
-12
lines changed

2 files changed

+25
-12
lines changed

app/docs/text.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ When you need to add custom font styles in specific places, rely on these utilit
44

55
Change an element and/or it's children to use sans or sans-serif font family as defined in your `_config.scss`.
66

7-
<p class="filler has-padding has-sans-font">I'm in sans-serif style!</p>
8-
<p class="filler has-padding has-serif-font">I'm in serif style!</p>
7+
<p class="filler has-padding has-sans-text">I'm in sans-serif style!</p>
8+
<p class="filler has-padding has-serif-text">I'm in serif style!</p>
99

1010
```html
11-
<p class="has-sans-font">I'm in sans-serif style!</p>
12-
<p class="has-serif-font">I'm in serif style!</p>
11+
<p class="has-sans-text">I'm in sans-serif style!</p>
12+
<p class="has-serif-text">I'm in serif style!</p>
1313
```
1414

1515
## Text Align
@@ -30,12 +30,12 @@ Align text left, right, or center.
3030

3131
Make your font bold or italic.
3232

33-
<p class="filler has-padding is-bold">I'm bold!</p>
34-
<p class="filler has-padding is-italic">I'm italic!</p>
33+
<p class="filler has-padding has-bold-text">I'm bold!</p>
34+
<p class="filler has-padding has-italic-text">I'm italic!</p>
3535

3636
```html
37-
<p class="is-bold">I'm bold!</p>
38-
<p class="is-italic">I'm italic!</p>
37+
<p class="has-bold-text">I'm bold!</p>
38+
<p class="has-italic-text">I'm italic!</p>
3939
```
4040

4141
<hr />

src/scss/utilities/_classes.scss

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88
// Typography style modifiers
99

10-
.has-sans-font {
10+
.has-sans-text {
1111
font-family: $global-font-sans !important;
1212
}
13-
.has-serif-font {
13+
.has-serif-text {
1414
font-family: $global-font-serif !important;
1515
}
1616

@@ -20,10 +20,10 @@
2020
}
2121
}
2222

23-
.is-bold {
23+
.has-bold-text {
2424
font-weight: $global-font-weight-bold !important;
2525
}
26-
.is-italic {
26+
.has-italic-text {
2727
font-style: $global-font-style-italic !important;
2828
}
2929

@@ -212,3 +212,16 @@
212212
width: auto;
213213
}
214214
}
215+
216+
// Revert `is-visually-hidden` class. Will always ensure an element is normally visible even
217+
// if hidden class is present.
218+
219+
.is-not-visually-hidden {
220+
clip: auto;
221+
height: auto;
222+
margin: 0;
223+
overflow: visible;
224+
position: static;
225+
white-space: normal;
226+
width: auto;
227+
}

0 commit comments

Comments
 (0)