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 --font-size-* variables to --text-* #14909

Merged
merged 12 commits into from
Nov 7, 2024

Conversation

adamwathan
Copy link
Member

This PR updates all of the --font-size-* variables to --text-* instead to closer match the utility names.

  @theme {
-   --font-size-xs: 0.75rem;
-   --font-size-xs--line-height: 1rem;
-   --font-size-sm: 0.875rem;
-   --font-size-sm--line-height: 1.25rem;
-   --font-size-base: 1rem;
-   --font-size-base--line-height: 1.5rem;
-   --font-size-lg: 1.125rem;
-   --font-size-lg--line-height: 1.75rem;
-   --font-size-xl: 1.25rem;
-   --font-size-xl--line-height: 1.75rem;

    /* ... */
  
+   --text-xs: 0.75rem;
+   --text-xs--line-height: 1rem;
+   --text-sm: 0.875rem;
+   --text-sm--line-height: 1.25rem;
+   --text-base: 1rem;
+   --text-base--line-height: 1.5rem;
+   --text-lg: 1.125rem;
+   --text-lg--line-height: 1.75rem;
+   --text-xl: 1.25rem;
+   --text-xl--line-height: 1.75rem;

    /* ... */
  }

This is part of a bigger set of changes where we're renaming other theme variables as well with the same goals, since many existing theme variables like --shadow-* and --radius-* are already not using the explicit CSS property name.

@adamwathan adamwathan requested a review from a team as a code owner November 7, 2024 16:09
@adamwathan adamwathan force-pushed the change/rename-font-size-variables-to-text branch from 958cebc to e39d1d9 Compare November 7, 2024 16:09
@adamwathan adamwathan merged commit 28e46ba into next Nov 7, 2024
1 check passed
@adamwathan adamwathan deleted the change/rename-font-size-variables-to-text branch November 7, 2024 19:08
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.

3 participants