Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename --line-height-* variables to --leading-* #14925

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

philipp-spiess
Copy link
Member

@philipp-spiess philipp-spiess commented Nov 8, 2024

Part of the current changes, we also want to make the --line-height-* namespace closer to the utility name so we're renaming it to --leading-*:

  @theme {
-  --line-height-none: 1;
-  --line-height-tight: 1.25;
-  --line-height-snug: 1.375;
-  --line-height-normal: 1.5;
-  --line-height-relaxed: 1.625;
-  --line-height-loose: 2;

    /* ... */
  
+  --leading-none: 1;
+  --leading-tight: 1.25;
+  --leading-snug: 1.375;
+  --leading-normal: 1.5;
+  --leading-relaxed: 1.625;
+  --leading-loose: 2;

    /* ... */
  }

Notice that we did not change the nested values used in the --text type scale, e.g.:

@theme {
  /* Type scale */
  --text-xs: 0.75rem;
  --text-xs--line-height: 1rem;
}

These do not refer to the leading utility and instead refer to nested properties so we're keeping those as-is.

Test Plan

Added cases to the CSS theme() variable/JS plugin tests (interop layer) and the integration tests (codemod layer).

@philipp-spiess philipp-spiess force-pushed the change/rename-line-height-var-to-leading branch from f24045a to 65acba6 Compare November 8, 2024 16:09
@philipp-spiess philipp-spiess marked this pull request as ready for review November 8, 2024 16:11
@philipp-spiess philipp-spiess requested a review from a team as a code owner November 8, 2024 16:11
@RobinMalfait RobinMalfait merged commit 350add7 into next Nov 8, 2024
1 check passed
@RobinMalfait RobinMalfait deleted the change/rename-line-height-var-to-leading branch November 8, 2024 19:00
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