-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Define breakpoints and font sizes (#198)
https://www.refactoringui.com strongly recommends using a design system where we systematize colors, font sizes, and breakpoints. That is all moved to a new `theme/` folder. This will be useful with the mandates map, that we can keep in sync the same files. The breakpoint sizes come from tailwind.css. The font scale comes from refactoringui.com. It strongly recommends using `px` over `em`, and generally `px` over `rem` but `em` is an issue.
- Loading branch information
1 parent
b615136
commit e917bf6
Showing
6 changed files
with
40 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
@use "colors"; | ||
@use "theme/colors"; | ||
|
||
dd { | ||
margin-bottom: 10px; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
@use "colors"; | ||
@use "theme/colors"; | ||
|
||
header { | ||
width: 100%; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
@use "colors"; | ||
@use "theme/colors"; | ||
|
||
.popup-fixed { | ||
position: fixed; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Inspired by https://dev.to/alberto/defining-responsive-breakpoints-made-easy-with-sass-mixins-26p0. | ||
|
||
$sm-width: "640px"; | ||
$md-width: "768px"; | ||
$lg-width: "1024px"; | ||
$xl-width: "1280px"; | ||
|
||
@mixin gt-xs() { | ||
@media screen and (min-width: $sm-width) { | ||
@content(); | ||
} | ||
} | ||
|
||
@mixin gt-sm() { | ||
@media screen and (min-width: $md-width) { | ||
@content(); | ||
} | ||
} | ||
|
||
@mixin gt-md() { | ||
@media screen and (min-width: $lg-width) { | ||
@content(); | ||
} | ||
} | ||
|
||
@mixin gt-lg() { | ||
@media screen and (min-width: $xl-width) { | ||
@content(); | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
$font-size-xs: 12px; | ||
$font-size-sm: 14px; | ||
$font-size-base: 16px; | ||
$font-size-md: 18px; | ||
$font-size-lg: 20px; | ||
$font-size-xl: 24px; | ||
$font-size-2xl: 30px; |