Skip to content

Commit

Permalink
Tailwind: Use Tailwind font sizes for headings
Browse files Browse the repository at this point in the history
  • Loading branch information
wei2912 committed Mar 12, 2021
1 parent 1c80d1e commit 03412cb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 52 deletions.
52 changes: 0 additions & 52 deletions assets/css/components/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ html {

body {
color: color(var(--color-base) l(+20%));
font-size: 0.9375rem;
line-height: 1.6em;
}

label {
Expand Down Expand Up @@ -53,56 +51,6 @@ a[class]:hover {
transition: 0.2s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
line-height: 2.15em;
font-weight: 700;
}

h1 {
font-size: 2.875rem;
letter-spacing: -0.5px;
}
@media (max-width: 500px) {
h1 {
font-size: 1.6875rem;
}
}

h2 {
font-size: 2.25rem;
}
@media (max-width: 500px) {
h2 {
font-size: 1.375rem;
}
}

h3 {
font-size: 2rem;
}
@media (max-width: 500px) {
h3 {
font-size: 1.125rem;
}
}

h4 {
font-size: 1.625rem;
}

h5 {
font-size: 1.5rem;
}

h6 {
font-size: 1.375rem;
}

/* Remove all animations and transitions for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
* {
Expand Down
18 changes: 18 additions & 0 deletions assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,21 @@
@import "ghost/readmore.css";
@import "ghost/errors.css";
@import "ghost/footer.css";

@layer base {
h1, h2, h3, h4, h5, h6 {
@apply font-bold;
}
h1 {
@apply text-5xl;
}
h2 {
@apply text-4xl;
}
h3 {
@apply text-3xl;
}
h4, h5, h6 {
@apply text-2xl;
}
}

0 comments on commit 03412cb

Please sign in to comment.