Skip to content

Commit

Permalink
add font size variables
Browse files Browse the repository at this point in the history
  • Loading branch information
TarasKachmar2022 committed Mar 8, 2024
1 parent 6ffcfaa commit e87b09e
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 15 deletions.
14 changes: 14 additions & 0 deletions src/sass/base/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@
// Font weight
--fw-s: 300;
--fw-m: 400;
// Font sizes
--fs-btn-t: 18px;
--fs-logo-m: 32px;
--fs-logo-t: 35px;
--fs-nav-t: 18px;
--fs-main-title-m: 52px;
--fs-main-title-t: 55px;
--fs-uppertitle-m: 18px;
--fs-uppertitle-t: 20px;
--fs-section-title: 38px;
--fs-description-t: 18px;
--fs-copyright-t: 18px;
--fs-hero-descr: 22px;
--fs-team-subtitle: 23px;
// Text colors
--main-txt-cl: #ffffff;
--secondary-txt-cl: #333333;
Expand Down
2 changes: 1 addition & 1 deletion src/sass/components/_btn.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
transition-timing-function: var(--timing-function);

@media screen and (min-width: 768px) {
font-size: 18px;
font-size: var(--fs-btn-t);
line-height: 1.56;
}

Expand Down
4 changes: 2 additions & 2 deletions src/sass/components/_logo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
color: var(--accent-cl);

@media screen and (min-width: 320px) {
font-size: 32px;
font-size: var(--fs-logo-m);
line-height: 1.31;
}

@media screen and (min-width: 768px) {
font-size: 35px;
font-size: var(--fs-logo-t);
line-height: 1.2;
transition-property: scale;
transition-duration: var(--duration);
Expand Down
2 changes: 1 addition & 1 deletion src/sass/components/_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
transition-timing-function: var(--timing-function);

@media screen and (min-width: 768px) {
font-size: 18px;
font-size: var(--fs-nav-t);
line-height: 1.56;
}

Expand Down
12 changes: 6 additions & 6 deletions src/sass/components/_titles.scss
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
.main-title {
font-weight: var(--fw-s);
font-size: 52px;
font-size: var(--fs-main-title-m);
line-height: 1.27;

@media screen and (min-width: 768px) {
font-style: 55px;
font-size: var(--fs-main-title-t);
line-height: 1.2;
}
}

.uppertitle {
font-weight: var(--fw-m);
font-size: 18px;
font-size: var(--fs-uppertitle-m);
line-height: 1.67;

@media screen and (min-width: 768px) {
font-size: 20px;
font-size: var(--fs-uppertitle-t);
line-height: 1.65;
}
}

.section-title {
font-weight: var(--fw-s);
font-size: 38px;
font-size: var(--fs-section-title);
line-height: 1.26;
}

.description {
line-height: 1.63;

@media screen and (min-width: 768px) {
font-size: 18px;
font-size: var(--fs-description-t);
line-height: 1.56;
}
}
3 changes: 1 addition & 2 deletions src/sass/layout/_contact.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,10 @@

.contact__title {
font-weight: var(--fw-s);
font-size: 38px;
font-size: var(--fs-section-title);
line-height: 1.26;

@media screen and (min-width: 1360px) {
font-size: 38px;
line-height: 1.26;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/sass/layout/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
text-align: center;

@media screen and (min-width: 768px) {
font-size: 18px;
font-size: var(--fs-copyright-t);
line-height: 1.56;
}
}
2 changes: 1 addition & 1 deletion src/sass/layout/_hero.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
}

.hero__descr {
font-size: 22px;
font-size: var(--fs-hero-descr);
line-height: 1.68;
margin-bottom: 27px;

Expand Down
4 changes: 3 additions & 1 deletion src/sass/layout/_team.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,14 @@
padding: 14px;
}
}

.team__subtitle {
font-weight: var(--fw-m);
font-size: 23px;
font-size: var(--fs-team-subtitle);
line-height: 1.26;
margin-bottom: 11px;
}

.team__subdescr {
line-height: 1.63;
}

0 comments on commit e87b09e

Please sign in to comment.