Skip to content

Commit f27308a

Browse files
committed
chore: Update boostlook.css from boostlook repository
1 parent ef9839e commit f27308a

File tree

1 file changed

+26
-10
lines changed

1 file changed

+26
-10
lines changed

static/css/boostlook.css

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,8 @@
280280
--main-container: 90rem;
281281

282282
/* New Look Typography */
283-
--font-family-body: "Noto Sans";
284-
--font-family-code: "Noto Sans Mono";
283+
--font-family-body: "Noto Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
284+
--font-family-code: "Noto Sans Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
285285
--font-size-3xs: 0.625rem;
286286
--font-size-2xs: 0.75rem;
287287
--font-size-xs: 0.875rem;
@@ -725,11 +725,15 @@ html:has(.boostlook) {
725725
font-stretch: 62.5% 100%;
726726
/* Variable font weight range */
727727
font-variation-settings: "wght" 400, "wdth" 62.5;
728-
font-display: block;
729-
/* Prevents FOIT */
728+
font-display: swap;
730729
src: url("/static/font/notosans.woff2") format("woff2"),
731730
url("../../../../tools/boostlook/notosans.woff2") format("woff2"),
732731
url("https://cppalliance.org/fonts/NotoSansDisplay.ttf") format("truetype");
732+
/* Metric overrides to reduce CLS on swap */
733+
size-adjust: 100%;
734+
ascent-override: 92%;
735+
descent-override: 22%;
736+
line-gap-override: 0%;
733737
}
734738

735739
/* Noto Sans Display - Italic */
@@ -740,11 +744,15 @@ html:has(.boostlook) {
740744
font-stretch: 62.5% 100%;
741745
/* Variable font weight range */
742746
font-variation-settings: "wght" 400, "wdth" 62.5;
743-
font-display: block;
744-
/* Prevents FOIT */
747+
font-display: swap;
745748
src: url("/static/font/notosans_ext.woff2") format("woff2"),
746749
url("../../../../tools/boostlook/notosans_ext.woff2") format("woff2"),
747750
url("https://cppalliance.org/fonts/NotoSansDisplay-Italic.ttf") format("truetype");
751+
/* Metric overrides to reduce CLS on swap */
752+
size-adjust: 100%;
753+
ascent-override: 92%;
754+
descent-override: 22%;
755+
line-gap-override: 0%;
748756
}
749757

750758
/* Noto Sans Mono - Variable Weight */
@@ -755,11 +763,15 @@ html:has(.boostlook) {
755763
font-stretch: 62.5% 100%;
756764
/* Variable font weight range */
757765
font-variation-settings: "wght" 400, "wdth" 62.5;
758-
font-display: block;
759-
/* Prevents FOIT */
766+
font-display: swap;
760767
src: url("/static/font/notosans_mono.woff") format("woff"),
761768
url("../../../../tools/boostlook/notosans_mono.woff") format("woff"),
762769
url("https://cppalliance.org/fonts/NotoSansMono.ttf") format("truetype");
770+
/* Metric overrides to reduce CLS on swap */
771+
size-adjust: 100%;
772+
ascent-override: 92%;
773+
descent-override: 22%;
774+
line-gap-override: 0%;
763775
}
764776

765777
/* Noto Sans Mono - Fixed Weight */
@@ -769,11 +781,15 @@ html:has(.boostlook) {
769781
font-weight: 400;
770782
/* Fixed weight for specific use cases */
771783
font-stretch: 62.5% 100%;
772-
font-display: block;
773-
/* Prevents FOIT */
784+
font-display: swap;
774785
src: url("/static/font/notosans_mono.woff") format("woff"),
775786
url("../../../../tools/boostlook/notosans_mono.woff") format("woff"),
776787
url("https://cppalliance.org/fonts/NotoSansMono.ttf") format("truetype");
788+
/* Metric overrides to reduce CLS on swap */
789+
size-adjust: 100%;
790+
ascent-override: 92%;
791+
descent-override: 22%;
792+
line-gap-override: 0%;
777793
}
778794

779795
/*----------------- Font-Face Declarations end -----------------*/

0 commit comments

Comments
 (0)