Skip to content

Conversation

@langermank
Copy link
Contributor

@langermank langermank commented Nov 10, 2025

Primer's VRT tests run on Linux, and we can see that the line-height is just slightly off. Adding one more digit to the value seems to fix it (tested in dotcom and primer/react)

Dotcom: https://github-a489b1074d-56576033.drafts.github.io/vrt/#?q=s:failed
Primer React: https://primer-29525c1775-13348165.drafts.github.io/vrt/#?q=s:failed

@changeset-bot
Copy link

changeset-bot bot commented Nov 10, 2025

🦋 Changeset detected

Latest commit: 374dc66

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/primitives Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Nov 10, 2025

Design Token Diff (CSS)

/css/functional/typography/typography.css

+++ /home/runner/work/primitives/primitives/dist/css/functional/typography/typography.css	2025-11-10 21:00:34.671186965 +0000
@@ -4,8 +4,8 @@
 --fontStack-sansSerifDisplay: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
 --fontStack-system: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
 --text-body-lineHeight-large: 1.5;
-  --text-body-lineHeight-medium: 1.4285;
-  --text-body-lineHeight-small: 1.6666;
+  --text-body-lineHeight-medium: 1.42857;
+  --text-body-lineHeight-small: 1.66667;
 --text-body-size-large: 1rem;
 --text-body-size-medium: 0.875rem;
 --text-body-size-small: 0.75rem;

@github-actions
Copy link
Contributor

github-actions bot commented Nov 10, 2025

Design Token Diff (StyleLint)

/styleLint/functional/typography/typography.json

+++ /home/runner/work/primitives/primitives/dist/styleLint/functional/typography/typography.json	2025-11-10 21:00:34.671186965 +0000
@@ -142,7 +142,7 @@
 },
 "text-body-lineHeight-medium": {
   "key": "{text.body.lineHeight.medium}",
-    "$value": 1.4285,
+    "$value": 1.42857,
   "$type": "number",
   "$extensions": {
     "org.primer.data": {
@@ -156,7 +156,7 @@
   "filePath": "src/tokens/functional/typography/typography.json5",
   "isSource": true,
   "original": {
-      "$value": 1.4285,
+      "$value": 1.42857,
     "$type": "number",
     "$extensions": {
       "org.primer.data": {
@@ -175,7 +175,7 @@
 },
 "text-body-lineHeight-small": {
   "key": "{text.body.lineHeight.small}",
-    "$value": 1.6666,
+    "$value": 1.66667,
   "$type": "number",
   "$extensions": {
     "org.primer.data": {
@@ -189,7 +189,7 @@
   "filePath": "src/tokens/functional/typography/typography.json5",
   "isSource": true,
   "original": {
-      "$value": 1.6666,
+      "$value": 1.66667,
     "$type": "number",
     "$extensions": {
       "org.primer.data": {
@@ -230,7 +230,7 @@
 },
 "text-body-shorthand-medium": {
   "key": "{text.body.shorthand.medium}",
-    "$value": "400 0.875rem,14px/1.4285 -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'",
+    "$value": "400 0.875rem,14px/1.42857 -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'",
   "$type": "typography",
   "$description": "Default UI font. Most commonly used for body text.",
   "filePath": "src/tokens/functional/typography/typography.json5",
@@ -252,7 +252,7 @@
 },
 "text-body-shorthand-small": {
   "key": "{text.body.shorthand.small}",
-    "$value": "400 0.75rem,12px/1.6666 -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'",
+    "$value": "400 0.75rem,12px/1.66667 -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'",
   "$type": "typography",
   "$description": "Small body text for discrete UI applications, such as helper, footnote text. Should be used sparingly across pages. Line-height matches Body (medium) at 20px.",
   "filePath": "src/tokens/functional/typography/typography.json5",

@github-actions
Copy link
Contributor

github-actions bot commented Nov 10, 2025

Design Token Diff (Figma)

/figma/typography/typography.json

+++ /home/runner/work/primitives/primitives/dist/figma/typography/typography.json	2025-11-10 21:00:40.196163435 +0000
@@ -258,13 +258,13 @@
 },
 {
   "name": "medium",
-    "value": 1.4285,
+    "value": 1.42857,
   "type": "FLOAT",
   "refId": "medium"
 },
 {
   "name": "small",
-    "value": 1.6666,
+    "value": 1.66667,
   "type": "FLOAT",
   "refId": "small"
 },

@github-actions
Copy link
Contributor

github-actions bot commented Nov 10, 2025

Design Token Diff (Fallbacks)

/fallbacks/functional/typography/typography.json

+++ /home/runner/work/primitives/primitives/dist/fallbacks/functional/typography/typography.json	2025-11-10 21:00:34.671186965 +0000
@@ -28,12 +28,12 @@
 "--text-body-size-medium": "0.875rem",
 "--text-body-size-small": "0.75rem",
 "--text-body-lineHeight-large": 1.5,
-  "--text-body-lineHeight-medium": 1.4285,
-  "--text-body-lineHeight-small": 1.6666,
+  "--text-body-lineHeight-medium": 1.42857,
+  "--text-body-lineHeight-small": 1.66667,
 "--text-body-weight": 400,
 "--text-body-shorthand-large": "400 1rem/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'",
-  "--text-body-shorthand-medium": "400 0.875rem/1.4285 -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'",
-  "--text-body-shorthand-small": "400 0.75rem/1.6666 -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'",
+  "--text-body-shorthand-medium": "400 0.875rem/1.42857 -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'",
+  "--text-body-shorthand-small": "400 0.75rem/1.66667 -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'",
 "--text-caption-size": "0.75rem",
 "--text-caption-lineHeight": 1.3333,
 "--text-caption-weight": 400,

@github-actions github-actions bot temporarily deployed to Preview (Storybook) November 10, 2025 19:29 Inactive
@langermank langermank changed the title extend Extend line-height values to better support Linux Nov 10, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR increases the precision of two body text line-height values from 4 to 5 decimal places to fix rendering issues in VRT tests on Linux.

  • Extended text.body.lineHeight.medium from 1.4285 to 1.42857
  • Extended text.body.lineHeight.small from 1.6666 to 1.66667

Reviewed Changes

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

File Description
src/tokens/functional/typography/typography.json5 Updated line-height precision for medium and small body text sizes
.changeset/large-laws-doubt.md Added changeset documenting the patch-level change
Comments suppressed due to low confidence (1)

src/tokens/functional/typography/typography.json5:417

  • For consistency with the precision improvements made to body.lineHeight values, consider extending this line-height value to 5 decimal places (1.33333). The file also contains text.codeBlock.lineHeight at 1.5385 which could benefit from similar precision treatment if cross-platform rendering consistency is the goal.
        $value: 1.3333,

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

@github-actions github-actions bot temporarily deployed to Preview (Storybook) November 10, 2025 21:01 Inactive
@langermank langermank merged commit c160d8b into main Nov 10, 2025
35 checks passed
@langermank langermank deleted the fix-line-height-linux branch November 10, 2025 22:52
@primer primer bot mentioned this pull request Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants