Skip to content

Commit

Permalink
Add paragraph classes 1-3 to codebase (hackforla#2880)
Browse files Browse the repository at this point in the history
* Added variables for the font sizes and line height for the paragraph classes

* Added paragraph classes 1-3

%paragraph-class is a SCSS placeholder class, which has properties that are the same in all the paragraph classes.

* Fixed typo
  • Loading branch information
JessicaLucindaCheng authored Mar 3, 2022
1 parent d009237 commit 2f0bdc9
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
23 changes: 23 additions & 0 deletions _sass/elements/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,26 @@ map-get($font-family, body);
line-height: map-get($line-height-small, desktop);
}
}


%paragraph-class {
line-height: $line-height-paragraph-class;
font-family: $font-family-body;
font-weight: map-get($font-weight, normal);
color: $color-black;
}

.paragraph1 {
@extend %paragraph-class;
font-size: $font-size-paragraph1;
}

.paragraph2 {
@extend %paragraph-class;
font-size: $font-size-paragraph2;
}

.paragraph3 {
@extend %paragraph-class;
font-size: $font-size-paragraph3;
}
8 changes: 8 additions & 0 deletions _sass/variables/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ $font-size-title7: (
/* 16px*/ desktop: 1rem
);

$font-size-paragraph1: 1.25rem; /* Equivalent to 20px if base font-size is 16px */

$font-size-paragraph2: 1.125rem; /* Equivalent to 18px if base font-size is 16px */

$font-size-paragraph3: 1rem; /* Equivalent to 16px if base font-size is 16px */

$line-height-small: (
print: 1.25,
mobile: 1.25,
Expand Down Expand Up @@ -166,3 +172,5 @@ $line-height-h1: (
tablet: 1.125,
desktop: 1.05
);

$line-height-paragraph-class: 1.375; /* Equivalent to 137% */

0 comments on commit 2f0bdc9

Please sign in to comment.