Repository navigation
fix(csslib): retain line height and isolate font families when scaling - #17
Conversation
PR HealthPublish ✔️
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. This check can be disabled by tagging the PR with Changelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. This check can be disabled by tagging the PR with Breaking changes ✔️
This check can be disabled by tagging the PR with
API leaks
|
| Package | Leaked API symbol | Leaking sources |
|---|---|---|
| csslib | Messages | csslib/parser.dart::Analyzer::new::_messages messages.dart::Messages::mergeMessages::newMessages csslib/parser.dart::TopLevelIncludes::expand::messages csslib/parser.dart::TopLevelIncludes::new::_messages csslib/parser.dart::DeclarationIncludes::expand::messages csslib/parser.dart::DeclarationIncludes::new::_messages csslib/parser.dart::InheritExtends::new::_messages csslib/parser.dart::PolyFill::new::_messages |
This check can be disabled by tagging the PR with skip-leaking-check.
Unused Dependencies ✔️
| Package | Status |
|---|---|
| csslib | ✔️ All dependencies utilized correctly. |
For details on how to fix these, see dependency_validator.
This check can be disabled by tagging the PR with skip-unused-dependencies-check.
License Headers ✔️
// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
| Files |
|---|
| no missing headers |
All source files should start with a license header.
Unrelated files missing license headers
| Files |
|---|
| pkgs/html/test/differential_test.dart |
| pkgs/html/test/dom_parsing_test.dart |
| pkgs/html/test/mxss_test.dart |
| pkgs/html/test/noah_ark_clause_limit_test.dart |
This check can be disabled by tagging the PR with skip-license-check.
Coverage ✔️
| File | Coverage |
|---|---|
| pkgs/csslib/lib/src/property.dart | 💚 49 % ⬆️ 6 % |
This check for test coverage is informational (issues shown here will not fail the PR).
This check can be disabled by tagging the PR with skip-coverage-check.
e6cda67 to
91172fb
Compare
Findings
Font.scaledropped an explicitly specified line height, reused the caller's mutable font-family list, and threw a null-check error when the font did not specify a size (partial font styles).Fix
inPixels: false) unchanged, so the computed height still follows the scaled size.Regression tests
test/font_scale_test.dart: absolute and relative line height, default line height, weight, family-list isolation, and partial fonts without a size. Three of the four tests fail onmain(null-check error); the default-line-height test documents unchanged behavior.QA
dart format --output=none --set-exit-if-changed .: cleandart analyze --fatal-infos: no issuesdart test: all passed (186)Fontclass):property.dartauto-merges, only the CHANGELOG top line conflicts; combined suite 193 passed, analyzer clean.Note:
Font ==comparesfamilyby identity, sofont.scale(1) == fontis now false when a family list is set (it was already false whenever a line height was set). No caller in csslib relies on it.No Otzaria dependency repin.