Skip to content

Commit

Permalink
Added new typography util classes
Browse files Browse the repository at this point in the history
New util classes:
- text-transform
- letter-spacing
- text-decoration
- reponsive variations of flex-grow and flex-shrink

Co-Authored-By: Claudia Romano <claudia-romano@users.noreply.github.com>
  • Loading branch information
sebastiano-guerriero and claudia-romano committed Jan 11, 2020
1 parent 371f12a commit a64a6ec
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 4 deletions.
2 changes: 1 addition & 1 deletion main/assets/css/base/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ s {
text-decoration: line-through;
}

u, .text-underline {
u {
text-decoration: underline;
}

Expand Down
37 changes: 37 additions & 0 deletions main/assets/css/base/_util.scss
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,15 @@
white-space: nowrap;
}

// text transform
.text-uppercase { text-transform: uppercase; }
.text-capitalize { text-transform: capitalize; }

// letter spacing
.letter-spacing-sm { letter-spacing: -0.05em; }
.letter-spacing-md { letter-spacing: 0.05em; }
.letter-spacing-lg { letter-spacing: 0.1em; }

// font weight
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
Expand All @@ -551,6 +560,11 @@
.text-left { text-align: left; }
.text-right { text-align: right; }

// text-decoration
.text-line-through { text-decoration: line-through; }
.text-underline { text-decoration: underline; }
.text-decoration-none { text-decoration: none; }

// text-component line-height
.line-height-xs {
--heading-line-height: 1;
Expand Down Expand Up @@ -940,6 +954,9 @@ $media-wrapper-aspect-ratios: (
.flex-row-reverse\@xs { flex-direction: row-reverse; }
.flex-center\@xs { justify-content: center; align-items: center; }

.flex-grow-0\@xs { flex-grow: 0; }
.flex-shrink\@xs { flex-shrink: 1; }

// justify content
.justify-start\@xs { justify-content: flex-start; }
.justify-end\@xs { justify-content: flex-end; }
Expand Down Expand Up @@ -980,6 +997,11 @@ $media-wrapper-aspect-ratios: (
.flex-row\@sm { flex-direction: row; }
.flex-row-reverse\@sm { flex-direction: row-reverse; }
.flex-center\@sm { justify-content: center; align-items: center; }

.flex-grow-0\@sm { flex-grow: 0; }
.flex-grow\@sm { flex-grow: 1; }
.flex-shrink-0\@sm { flex-shrink: 0; }
.flex-shrink\@sm { flex-shrink: 1; }

// justify content
.justify-start\@sm { justify-content: flex-start; }
Expand Down Expand Up @@ -1021,6 +1043,11 @@ $media-wrapper-aspect-ratios: (
.flex-row\@md { flex-direction: row; }
.flex-row-reverse\@md { flex-direction: row-reverse; }
.flex-center\@md { justify-content: center; align-items: center; }

.flex-grow-0\@md { flex-grow: 0; }
.flex-grow\@md { flex-grow: 1; }
.flex-shrink-0\@md { flex-shrink: 0; }
.flex-shrink\@md { flex-shrink: 1; }

// justify content
.justify-start\@md { justify-content: flex-start; }
Expand Down Expand Up @@ -1062,6 +1089,11 @@ $media-wrapper-aspect-ratios: (
.flex-row\@lg { flex-direction: row; }
.flex-row-reverse\@lg { flex-direction: row-reverse; }
.flex-center\@lg { justify-content: center; align-items: center; }

.flex-grow-0\@lg { flex-grow: 0; }
.flex-grow\@lg { flex-grow: 1; }
.flex-shrink-0\@lg { flex-shrink: 0; }
.flex-shrink\@lg { flex-shrink: 1; }

// justify content
.justify-start\@lg { justify-content: flex-start; }
Expand Down Expand Up @@ -1103,6 +1135,11 @@ $media-wrapper-aspect-ratios: (
.flex-row\@xl { flex-direction: row; }
.flex-row-reverse\@xl { flex-direction: row-reverse; }
.flex-center\@xl { justify-content: center; align-items: center; }

.flex-grow-0\@xl { flex-grow: 0; }
.flex-grow\@xl { flex-grow: 1; }
.flex-shrink-0\@xl { flex-shrink: 0; }
.flex-shrink\@xl { flex-shrink: 1; }

// justify content
.justify-start\@xl { justify-content: flex-start; }
Expand Down
2 changes: 1 addition & 1 deletion main/assets/css/style-fallback.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion main/assets/css/style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codyhouse-framework",
"version": "2.3.2",
"version": "2.3.3",
"description": "A lightweight front-end framework for building accessible, bespoke interfaces.",
"main": "index.js",
"keywords": [
Expand Down

0 comments on commit a64a6ec

Please sign in to comment.