Skip to content

fix(styles): default line heights#192

Open
coryrylan wants to merge 1 commit into
mainfrom
topic-line-height-fallback-fix
Open

fix(styles): default line heights#192
coryrylan wants to merge 1 commit into
mainfrom
topic-line-height-fallback-fix

Conversation

@coryrylan

@coryrylan coryrylan commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator
  • provide better line height defaults for nve-text utils
  • refactor to improve consistency of behavior for nve-text utils

Summary by CodeRabbit

  • Style

    • Refreshed the typography system to be driven by CSS custom properties, improving consistency across display, heading, body, label, link, list, and code variants.
    • Updated variant sizing and link-state styling, including current-page navigation font-weight behavior.
    • Consolidated emphasis/muted/weight/transform/line-height/alignment logic and adjusted the code “flat” selector handling.
  • Tests

    • Added visual regression coverage for text line-height baselines and scoped body line-height overrides.
    • Loosened the compressed bundle-size limit check for typography.css.

@coryrylan coryrylan self-assigned this Jul 24, 2026
Copilot AI review requested due to automatic review settings July 24, 2026 18:47
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Typography CSS now uses custom properties for shared typography values, variants, and modifiers. Visual regression tests cover sizing and line-height overrides, while the Lighthouse compressed bundle-size threshold is increased.

Changes

Typography custom-property refactor

Layer / File(s) Summary
Custom-property typography foundation
projects/styles/src/typography.css
Shared text variants, sizing rules, link states, list inheritance, and the capsize fallback comment were updated to use internal custom properties.
Typography modifier consolidation
projects/styles/src/typography.css
Color, weight, transform, line-height, alignment, navigation, and code-flat selectors were consolidated or rewritten.
Typography regression validation
projects/styles/src/typography.test.visual.ts, projects/styles/src/index.test.lighthouse.ts
Visual tests cover typography variants and scoped body line-height overrides; the compressed typography.css limit changes from 1.65 KB to 1.8 KB.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested labels: scope(styles)

Suggested reviewers: johnyanarella

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and directly reflects the main change to default line-height behavior in styles.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch topic-line-height-fallback-fix

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

projects/styles/src/index.test.lighthouse.ts

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

projects/styles/src/typography.css

ESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.

projects/styles/src/typography.test.visual.ts

ESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.


Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the design-system typography defaults by adjusting theme line-height reference tokens and refactoring the nve-text utility CSS so text styles (size/weight/line-height/color/decoration) are driven by shared internal custom properties, with new/updated tests and baselines to validate the changes.

Changes:

  • Adjusted ref.font.lineHeight token values/descriptions in the themes token source and added a regression test asserting unitless relative line-height variables are emitted.
  • Refactored projects/styles typography utilities to use internal --_… variables for consistent application of font-size/weight/line-height/color/decoration, and added visual baselines for wrapped text line-height behavior.
  • Updated bundle-size guardrails to account for the typography CSS refactor and added new visual baseline assets.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
projects/themes/src/index.test.ts Adds a regression test verifying unitless relative line-height variables are generated.
projects/themes/src/index.json Updates the default relative line-height token values and their descriptions.
projects/styles/src/typography.test.visual.ts Adds visual regression coverage for wrapped text line-height behavior and an override scenario.
projects/styles/src/typography.css Refactors nve-text typography utilities to use shared internal CSS variables and updates defaults.
projects/styles/src/index.test.lighthouse.ts Adjusts the compressed bundle-size threshold for typography.css.
projects/styles/.visual/text-line-height.png Adds a new visual regression baseline (LFS).
projects/styles/.visual/text-line-height-override.png Adds a new visual regression baseline (LFS).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread projects/styles/src/typography.css
Comment thread projects/styles/src/typography.css

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@projects/styles/src/typography.css`:
- Around line 160-176: Restrict the no-visit override in the typography link
state rules to the visited state only, so it cancels the visited color without
overriding hover feedback. Update the selector for &[nve-text~='no-visit'] near
the existing &:visited and &:hover rules, preserving the normal link color
behavior outside the visited state.
- Around line 88-109: Update the heading xl override in the
[nve-text~='heading'] typography rule to use the snug line-height token instead
of moderate, while preserving the existing font size and the xs moderate
override.
- Line 15: Insert a blank line before the first normal declaration following the
custom-property declarations in all six typography groups:
projects/styles/src/typography.css lines 15, 240, 270, 298, 320, and 348. Apply
this before font-family, color, font-weight, text-transform, line-height, and
text-align respectively; no declaration values or ordering need to change.

In `@projects/styles/src/typography.test.visual.ts`:
- Around line 42-61: Add a waitFor assertion in the test body around
visualRunner.render for the text-line-height-override scenario that selects one
body-text element, reads its computed line-height, and verifies it resolves to
the 1.5 override value before checking maxDiffPercentage. Keep the existing
visual regression assertion unchanged.

In `@projects/themes/src/index.test.ts`:
- Around line 45-53: Update the line-height assertions in the “should generate
unitless relative font line heights” test to include the semicolon terminating
each CSS custom-property declaration, ensuring values such as 1.2 do not match
longer values like 1.25.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 05941f8c-1c5e-4e84-a350-89d305d44639

📥 Commits

Reviewing files that changed from the base of the PR and between 6cf3292 and 3606787.

⛔ Files ignored due to path filters (2)
  • projects/styles/.visual/text-line-height-override.png is excluded by !**/*.png
  • projects/styles/.visual/text-line-height.png is excluded by !**/*.png
📒 Files selected for processing (5)
  • projects/styles/src/index.test.lighthouse.ts
  • projects/styles/src/typography.css
  • projects/styles/src/typography.test.visual.ts
  • projects/themes/src/index.json
  • projects/themes/src/index.test.ts

Comment thread projects/styles/src/typography.css
Comment thread projects/styles/src/typography.css
Comment thread projects/styles/src/typography.css
Comment thread projects/styles/src/typography.test.visual.ts
Comment thread projects/themes/src/index.test.ts Outdated
Copilot AI review requested due to automatic review settings July 24, 2026 19:08
@coryrylan
coryrylan force-pushed the topic-line-height-fallback-fix branch from 3606787 to cd8f21a Compare July 24, 2026 19:08

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@projects/styles/src/typography.css`:
- Around line 12-20: Update the `link` and `list` typography blocks so
`--_font-size` and `--_font-weight` are both set to `inherit` instead of
resetting to initial or the regular reference weight, while preserving the
existing declarations for other text properties.
- Around line 220-223: Update the active-page selector a[aria-current='page'] in
the typography styles to preserve its semibold font weight with !important, or
set the selector’s --_font-weight value so it overrides the base link rule. Keep
the existing active-page color unchanged.

In `@projects/styles/src/typography.test.visual.ts`:
- Line 28: Update the layout container in the typography visual test to specify
an explicit height alongside its existing width, matching the constrained
dimensions used by the other active tests and the sibling text-size test setup.

In `@projects/themes/src/index.json`:
- Around line 1610-1613: Update the description for the loose lineHeights token
in the themes index so it describes the increased spacing outcome without using
the contradictory “dense” wording. Keep the guidance for captions, small print,
and body text, and ensure the revised wording is suitable for generated schema
and documentation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 36d32b4d-20a7-46f7-a688-cd28c53c40a7

📥 Commits

Reviewing files that changed from the base of the PR and between 3606787 and cd8f21a.

⛔ Files ignored due to path filters (2)
  • projects/styles/.visual/text-line-height-override.png is excluded by !**/*.png
  • projects/styles/.visual/text-line-height.png is excluded by !**/*.png
📒 Files selected for processing (5)
  • projects/styles/src/index.test.lighthouse.ts
  • projects/styles/src/typography.css
  • projects/styles/src/typography.test.visual.ts
  • projects/themes/src/index.json
  • projects/themes/src/index.test.ts

Comment thread projects/styles/src/typography.css
Comment thread projects/styles/src/typography.css
Comment thread projects/styles/src/typography.test.visual.ts
Comment thread projects/themes/src/index.json Outdated
@coryrylan
coryrylan force-pushed the topic-line-height-fallback-fix branch from cd8f21a to 8a33957 Compare July 24, 2026 19:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (2)

projects/styles/src/typography.css:223

  • ul[nve-text~='nav'] li > a[aria-current='page'] sets font-weight without !important, but the base [nve-text~='link'] rule applies font-weight: var(--_font-weight) !important;, so this semibold style will never win. Set the --_font-weight custom property instead (fits the new variable-based refactor and works with the existing !important font-weight declaration).
  > a[aria-current='page'] {
    color: var(--nve-sys-text-link-hover-color) !important;
    font-weight: var(--nve-ref-font-weight-semibold);
  }

projects/styles/src/typography.css:154

  • The refactor makes [nve-text~='link'] inherit the base typography variables, which currently default --_font-size to initial and --_font-weight to regular. Since nve-text="link" is used widely without also specifying body/heading/..., this changes links from inheriting surrounding typography to forcing default size/weight. Consider explicitly setting link typography variables to inherit so inline links keep the surrounding text size/weight.
[nve-text~='link'] {
  --_color: var(--nve-sys-text-link-color);
  --_line-height: inherit;
  --_text-decoration: underline;

Comment thread projects/styles/src/typography.css
Copilot AI review requested due to automatic review settings July 24, 2026 19:16
@coryrylan
coryrylan force-pushed the topic-line-height-fallback-fix branch from 8a33957 to c1f6ea1 Compare July 24, 2026 19:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

projects/styles/src/typography.css:153

  • nve-text="link" is used in the codebase inside nav lists where the list items set the intended font-size (and sometimes weight) for the link text. Because the shared base rule applies font-size: var(--_font-size) !important and defaults --_font-size to initial, standalone links will no longer inherit their surrounding font size/weight.

Setting --_font-size/--_font-weight to inherit for the link utility restores the expected “link as modifier” behavior while keeping the variable-driven approach.

[nve-text~='link'] {
  --_color: var(--nve-sys-text-link-color);
  --_line-height: inherit;
  --_text-decoration: underline;

projects/styles/src/typography.css:223

  • > a[aria-current='page'] currently sets font-weight without !important. This won’t override the !important font-weight coming from the nve-text="link" utility (which is how the nav list examples are authored), so the current-page link won’t actually render semibold.
  > a:not(:hover) {
    color: var(--nve-sys-text-muted-color) !important;
  }

Copilot AI review requested due to automatic review settings July 24, 2026 19:23

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@projects/styles/src/typography.css`:
- Around line 155-167: Update the link state selectors around typography.css
lines 155-167 to ensure disabled links retain disabled color over visited or
hover states, and update the color-modifier group around lines 232-247 so link
modifiers preserve link hover feedback. Apply the requested specificity or
selector scoping consistently at both sites, including link muted, emphasis,
white, black, and inherit variants.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 3b07567e-2aa6-4643-b15d-5d719ef79046

📥 Commits

Reviewing files that changed from the base of the PR and between cd8f21a and 8a33957.

⛔ Files ignored due to path filters (2)
  • projects/styles/.visual/text-line-height-override.png is excluded by !**/*.png
  • projects/styles/.visual/text-line-height.png is excluded by !**/*.png
📒 Files selected for processing (3)
  • projects/styles/src/index.test.lighthouse.ts
  • projects/styles/src/typography.css
  • projects/styles/src/typography.test.visual.ts

Comment on lines +155 to +167
&[nve-text~='disabled'] {
--_color: var(--nve-sys-text-link-disabled-color);
}

&:visited,
&[nve-text~='visited'] {
--_color: var(--nve-sys-text-link-visited-color);
}

&:hover,
&[nve-text~='hover'] {
--_color: var(--nve-sys-text-link-hover-color);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Link state colors are decided by source order, not intent. Every state and modifier selector in the refactor lands at specificity (0,2,0), so whichever --_color declaration appears last in the file wins — which silently disables states the author expected to hold.

  • projects/styles/src/typography.css#L155-L167: &[nve-text~='disabled'] precedes &:visited / &:hover, so disabled links still pick up hover and visited colors; exclude [nve-text~='disabled'] from the state rules or give the disabled block higher specificity.
  • projects/styles/src/typography.css#L232-L247: the color-modifier group sits after the whole link block, so nve-text="link muted" (and emphasis/white/black/inherit) loses hover feedback; scope these with :not([nve-text~='link']) or re-add link-scoped color mappings inside the link block.
📍 Affects 1 file
  • projects/styles/src/typography.css#L155-L167 (this comment)
  • projects/styles/src/typography.css#L232-L247
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@projects/styles/src/typography.css` around lines 155 - 167, Update the link
state selectors around typography.css lines 155-167 to ensure disabled links
retain disabled color over visited or hover states, and update the
color-modifier group around lines 232-247 so link modifiers preserve link hover
feedback. Apply the requested specificity or selector scoping consistently at
both sites, including link muted, emphasis, white, black, and inherit variants.

Signed-off-by: Cory Rylan <crylan@nvidia.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

projects/styles/src/typography.css:14

  • --_font-size: initial / --_line-height: initial in the base [nve-text~='…'] rule forces font-size/line-height to reset instead of inheriting from the surrounding text. This is a behavior regression for common patterns like <p nve-text="body …"><a nve-text="link">…</a></p> and <ul nve-text="list">…</ul>, where link/list are expected to inherit the parent’s typography unless explicitly sized.
  --_color: var(--nve-sys-text-color);
  --_font-weight: var(--nve-ref-font-weight-regular);
  --_font-size: initial;
  --_line-height: initial;
  --_text-decoration: initial;

projects/styles/src/typography.css:154

  • The refactor removed the link utility’s xl/lg/sm sizing behavior, and nve-text="link" no longer inherits font size/weight when used without also applying a base variant (e.g. body). There are multiple call sites that use nve-text="link" or nve-text="link sm" directly, so this likely changes typography unexpectedly.
[nve-text~='link'] {
  --_color: var(--nve-sys-text-link-color);
  --_font-size: inherit;
  --_font-weight: inherit;
  --_line-height: inherit;

Copilot AI review requested due to automatic review settings July 24, 2026 19:30

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (4)
projects/styles/src/typography.css (3)

15-15: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Stylelint declaration-empty-line-before still failing at 6 sites.

Same rule as before — a normal declaration immediately follows the --_* custom-property block in each group, which the repo's Stylelint config rejects. Sites (per current lint output): Line 15 (font-family, base group), Line 247 (color, color group), Line 277 (font-weight, weights group), Line 305 (text-transform, transforms group), Line 327 (line-height, line-heights group), Line 355 (text-align, text-align group).

🛠️ Example fix (repeat pattern at each of the 6 sites)
   --_text-decoration: initial;
+
   font-family: var(--nve-ref-font-family) !important;

Also applies to: 247-247, 277-277, 305-305, 327-327, 355-355

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@projects/styles/src/typography.css` at line 15, In the typography declaration
groups, update the normal declarations immediately following each
custom-property block—font-family, color, font-weight, text-transform,
line-height, and text-align—to satisfy the repository’s
declaration-empty-line-before Stylelint rule by adding the required empty line
at all six sites.

Source: Linters/SAST tools


88-108: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Heading xl still uses a looser line-height than every smaller heading.

Ramp is non-monotonic: xl (24px) = moderate (line 94), lg/base/sm/xs all resolve to snug. The largest heading ends up the loosest, inverting the size/ratio relationship and contradicting moderate's intended use (dense/interface text) vs snug (headings). This is the same concern raised previously; despite a prior "addressed" note, the moderate override for xl is still present in this code. It also gets baked into the new text-line-height visual baseline (typography.test.visual.ts, heading xl row), so shipping this locks the anomaly into the committed snapshot.

🐛 Proposed fix if `xl` should stay snug
   &[nve-text~='xl'] {
     --_font-size: var(--nve-ref-font-size-600);
-    --_line-height: var(--nve-ref-font-line-height-moderate);
   }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@projects/styles/src/typography.css` around lines 88 - 108, Update the xl
override within the [nve-text~='heading'] typography rule to use the snug
line-height token instead of moderate, while preserving its larger font-size
token and the existing line-height behavior for all smaller heading sizes.

161-173: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Link state colors are still decided by source order, not intent.

Every state/modifier selector here compiles to the same specificity, (0,2,0), so whichever --_color declaration is last in source order wins — silently disabling states the author expects to hold:

  • Lines 161-173: &[nve-text~='disabled'] precedes &:visited/&:hover; a disabled link that is also :hovered or :visited picks up the hover/visited color instead of staying disabled.
  • Lines 241-268: this color-modifier group sits after the whole link block, so nve-text="link muted" (and emphasis/white/black/inherit) loses hover/visited feedback once hovered — the modifier's --_color wins the tie at equal specificity purely by appearing later in the file.

The no-visit rule above (line 175) already demonstrates the fix pattern (bump specificity via :not()/extra state selectors) — apply the same idea here.

🐛 Proposed fix sketch
-  &[nve-text~='disabled'] {
+  &[nve-text~='disabled']:not(:hover):not(:visited) {
     --_color: var(--nve-sys-text-link-disabled-color);
   }
-[nve-text~='emphasis'],
-[nve-text~='muted'],
-[nve-text~='white'],
-[nve-text~='black'],
-[nve-text~='inherit'] {
+[nve-text~='emphasis']:not([nve-text~='link']),
+[nve-text~='muted']:not([nve-text~='link']),
+[nve-text~='white']:not([nve-text~='link']),
+[nve-text~='black']:not([nve-text~='link']),
+[nve-text~='inherit']:not([nve-text~='link']) {

Also applies to: 241-268

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@projects/styles/src/typography.css` around lines 161 - 173, Update the link
state selectors in the disabled/visited/hover group and the color-modifier group
to use higher specificity, following the existing no-visit rule’s
:not()/additional-state pattern. Ensure disabled remains dominant over visited
and hover, while hover/visited feedback remains dominant over muted, emphasis,
white, black, and inherit modifiers regardless of source order.
projects/styles/src/typography.test.visual.ts (1)

42-61: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a computed-style assertion for the line-height override.

maxDiffPercentage < 1 only guards the screenshot. Add a check on one body-text element's computed line-height so a broken override can't be silently re-baselined into the failure state.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@projects/styles/src/typography.test.visual.ts` around lines 42 - 61, Add a
computed-style assertion to the visual test around the text-line-height-override
render, targeting one body-text paragraph and verifying its computed line-height
is 1.5. Keep the existing maxDiffPercentage screenshot assertion and use the
visual runner’s established DOM or browser evaluation API to inspect the
rendered element.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@projects/styles/src/typography.css`:
- Line 15: In the typography declaration groups, update the normal declarations
immediately following each custom-property block—font-family, color,
font-weight, text-transform, line-height, and text-align—to satisfy the
repository’s declaration-empty-line-before Stylelint rule by adding the required
empty line at all six sites.
- Around line 88-108: Update the xl override within the [nve-text~='heading']
typography rule to use the snug line-height token instead of moderate, while
preserving its larger font-size token and the existing line-height behavior for
all smaller heading sizes.
- Around line 161-173: Update the link state selectors in the
disabled/visited/hover group and the color-modifier group to use higher
specificity, following the existing no-visit rule’s :not()/additional-state
pattern. Ensure disabled remains dominant over visited and hover, while
hover/visited feedback remains dominant over muted, emphasis, white, black, and
inherit modifiers regardless of source order.

In `@projects/styles/src/typography.test.visual.ts`:
- Around line 42-61: Add a computed-style assertion to the visual test around
the text-line-height-override render, targeting one body-text paragraph and
verifying its computed line-height is 1.5. Keep the existing maxDiffPercentage
screenshot assertion and use the visual runner’s established DOM or browser
evaluation API to inspect the rendered element.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 6c4199c2-0654-42c4-bbeb-c91c5808077a

📥 Commits

Reviewing files that changed from the base of the PR and between 8a33957 and aa9c1e4.

⛔ Files ignored due to path filters (2)
  • projects/styles/.visual/text-line-height-override.png is excluded by !**/*.png
  • projects/styles/.visual/text-line-height.png is excluded by !**/*.png
📒 Files selected for processing (3)
  • projects/styles/src/index.test.lighthouse.ts
  • projects/styles/src/typography.css
  • projects/styles/src/typography.test.visual.ts

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

projects/styles/src/typography.css:245

  • The generic color modifier block comes after the [nve-text~='link'] block, so nve-text="link emphasis" ends up using the generic --nve-sys-text-emphasis-color instead of the link-specific --nve-sys-text-link-emphasis-color (the later [nve-text~='emphasis'] rule overwrites --_color). This makes the link emphasis variant ineffective.
[nve-text~='emphasis'],
[nve-text~='muted'],
[nve-text~='white'],
[nve-text~='black'],
[nve-text~='inherit'] {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants