Skip to content

Commit

Permalink
fix: first letter style
Browse files Browse the repository at this point in the history
  • Loading branch information
fbuireu committed Jan 27, 2025
1 parent 36474f6 commit 4c0111a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/pages/articles/_article.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,24 @@
view-timeline: var(--is);
}

@supports (initial-letter: 3 2) {
& > p:first-of-type::first-letter {
color: var(--primary-main);
}

@supports (initial-letter: 2 2) {
& > p:first-of-type::first-letter {
initial-letter: 3 2;
initial-letter: 2 2;
padding-right: 0.25rem;
}
}

@supports not (initial-letter: 2 2) {
& > p:first-of-type::first-letter {
float: left;
font-size: 2lh;
}
}

@media (width <= 960px) {
gap: 0;
margin-inline: 1rem;
Expand Down
9 changes: 9 additions & 0 deletions src/ui/styles/base/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@
}
}

h1,
h2,
h3,
h4,
h5,
h6 {
text-box: trim-both cap alphabetic;
}

h1 {
font-size: clamp(4rem, 4.25vw, 5.25rem);
}
Expand Down

0 comments on commit 4c0111a

Please sign in to comment.