From 4c92c03081bdf42f37d79c5b152ce42126daaaa5 Mon Sep 17 00:00:00 2001 From: Estelle Weyl Date: Tue, 29 Oct 2024 13:36:41 -0700 Subject: [PATCH] Apply suggestions from code review --- .../web/css/@font-face/font-weight/index.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/files/en-us/web/css/@font-face/font-weight/index.md b/files/en-us/web/css/@font-face/font-weight/index.md index ac594359023a1f3..15855b9f9566b17 100644 --- a/files/en-us/web/css/@font-face/font-weight/index.md +++ b/files/en-us/web/css/@font-face/font-weight/index.md @@ -93,7 +93,7 @@ After this, CSS rules can select the normal or the bold font for the "Fira Sans" ```html

Fira Sans, normal weight paragraph

Fira Sans, bold weight paragraph

-Fira Sans, default weight <strong> element +

Fira Sans, default weight <strong> element

``` #### CSS @@ -154,12 +154,13 @@ To show the effect of this we've included another font using "League Mono" that } @font-face { - font-family: "League Mono-complete"; - src: url("https://mdn.github.io/shared-assets/fonts/LeagueMono-VF.ttf"); +@font-face { + font-family: "FireSans"; + src: url("https://mdn.github.io/shared-assets/fonts/FiraSans-Regular.woff2"); } p { - font-family: "League Mono", "League Mono-complete", serif; + font-family: "League Mono", "FireSans", serif; font-size: 1.5rem; } @@ -184,10 +185,10 @@ p.four { The result of this is: -- Setting the `font-weight` property to `100` for "League Mono" gets a weight of 300. -- Setting the `font-weight` property to `900` for "League Mono" gets a weight of 700. -- Setting the `font-weight` property to `100` for "League Mono-complete" gets a weight of 100. -- Setting the `font-weight` property to `900` for "League Mono-complete" gets a weight of 900. +- Setting the `font-weight` property to `200` gets a `normal` version of FireSans. +- Setting the `font-weight` property to `400` gets "League Mono" at a weight of 400. +- Setting the `font-weight` property to `600` gets "League Mono" at a weight of 600. +- Setting the `font-weight` property to `800` gets a boldened version of "FireSans". {{embedlivesample("Setting a range for a variable font", "", "400")}}