Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkgs/csslib/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
sharing mutable AST nodes between the original and its clone.
- Correctly parse unit-like type selectors (`rem`, `vw`, `dpi`, etc.) at the
start of `selector()` and `parseSelectorGroup()` input and of style rules.
- Fix `Font.cssExpression` output for partial fonts and line heights.
- Fix the values of the `aliceblue` color keyword and the `Color.aliceBlue`,
`Color.antiqueWhite` and `Color.peru` constants.
- Fix unhandled exceptions (`RangeError`, `FormatException`, `StateError`,
Expand Down
8 changes: 4 additions & 4 deletions pkgs/csslib/lib/src/property.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1084,12 +1084,12 @@ class Font implements _StyleProperty {
///
/// font-style font-variant font-weight font-size/line-height font-family
///
/// The font-size and font-family values are required. If any of the other
/// values are missing the default value is used.
/// Only the parts that are set are printed, so a partial font (for example
/// one with only a weight, which prints `700`) is not a complete `font`
/// shorthand; that needs at least a size and a family.
@override
String get cssExpression {
// Partial fonts omit absent parts. A unitless line height is a multiplier,
// so pixel heights need their unit.
// A unitless line height is a multiplier, so pixel heights need their unit.
final families = _fontsAsString;
final height = lineHeight;
final sizePart = size == null
Expand Down
Loading