-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add Font styles #1635
Add Font styles #1635
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving a note from our synchronous review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, one pass needed on descriptions but this is very close to done. Thank you!
features/font-stretch.yml
Outdated
@@ -0,0 +1,12 @@ | |||
name: font-stretch | |||
description: The `font-stretch` CSS property selects a font face from a font family based on width, either by a keyword such as "condensed" or a percentage. The `font-stretch` property will be replaced by `font-width`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
font-width
exists in no implementations yet (AFAIK). Let's move that to a comment and return to this when there's something contemporary to reference.
description: The `font-stretch` CSS property selects a font face from a font family based on width, either by a keyword such as "condensed" or a percentage. The `font-stretch` property will be replaced by `font-width`. | |
description: The `font-stretch` CSS property selects a font face from a font family based on width, either by a keyword such as `condensed` or a percentage. | |
# Note: `font-stretch` will become an alias to `font-width`: https://drafts.csswg.org/css-fonts/#font-stretch-desc |
features/font-size.yml
Outdated
@@ -0,0 +1,11 @@ | |||
name: font-size | |||
description: The `font-size` CSS property sets the text size. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spec says height, which feels like a nice way to dodge the "size sets size" circularity here.
description: The `font-size` CSS property sets the text size. | |
description: The `font-size` CSS property sets the text height. |
features/font-metric-overrides.yml
Outdated
@@ -0,0 +1,11 @@ | |||
name: Font metric overrides | |||
description: The `ascent-override`, `descent-override` and `line-gap-override` descriptors adjust the display of a font declared in an `@font-face`. This can help make fallback fonts look the same size. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: The `ascent-override`, `descent-override` and `line-gap-override` descriptors adjust the display of a font declared in an `@font-face`. This can help make fallback fonts look the same size. | |
description: The `ascent-override`, `descent-override`, and `line-gap-override` descriptors adjust the display of a font declared in an `@font-face` statement. This can help make fallback fonts look the same size. |
features/font-family-math.yml
Outdated
@@ -0,0 +1,5 @@ | |||
name: Math font family | |||
description: The `font-family:\ math` CSS declaration uses the browser default font face for displaying mathematical expressions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, these slashes show up literally
description: The `font-family:\ math` CSS declaration uses the browser default font face for displaying mathematical expressions. | |
description: The `font-family: math` CSS declaration uses the browser default font face for displaying mathematical expressions. |
You can "preview" the HTML for these with npx tsx -p 'import { features } from "./index.ts"; Object.values(features).forEach(f => console.l og(f.description_html));' | grep 'system-ui'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing it breaks YAML, and gives the error-
YAMLParseError: Nested mappings are not allowed in compact mappings at line 2, column 14:
I'm able to fix it by wrapping in double quotes.
features/font-family-system.yml
Outdated
@@ -0,0 +1,6 @@ | |||
name: System font | |||
description: The `font-family:\ system-ui` CSS declaration uses the operating system default font for text. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: The `font-family:\ system-ui` CSS declaration uses the operating system default font for text. | |
description: The `font-family: system-ui` CSS declaration uses the operating system default font for text. |
Combines several font features-