Skip to content

feat(styles): CSS variables for fonts#22666

Merged
J-Sek merged 1 commit intomasterfrom
feat/css-variables-for-fonts
Mar 2, 2026
Merged

feat(styles): CSS variables for fonts#22666
J-Sek merged 1 commit intomasterfrom
feat/css-variables-for-fonts

Conversation

@J-Sek
Copy link
Copy Markdown
Contributor

@J-Sek J-Sek commented Mar 1, 2026

Utility of no-Sass approach based on loading style entry points (introduced by #22396) is limited. It is true, users give up on customization, but we can still make it possible to set the typeface, they could set using theme variables.

$body-font-family: var(--v-font-body, 'Roboto', sans-serif) !default;
$heading-font-family: var(--v-font-heading, #{$body-font-family}) !default;
export default createVuetify({
 theme: {
    defaultTheme: 'light',
    themes: {
      light: { // variables of default theme are "inherited" by every other theme
        variables: {
          'font-heading': '"Bricolage Grotesque", sans-serif',
          'font-body': 'Sen, sans-serif',
        },
      },
    },
  },
})

@J-Sek J-Sek self-assigned this Mar 1, 2026
@J-Sek J-Sek added T: feature A new feature sass labels Mar 1, 2026
AndreyYolkin
AndreyYolkin previously approved these changes Mar 2, 2026
@J-Sek J-Sek changed the base branch from dev to master March 2, 2026 19:32
@J-Sek J-Sek dismissed AndreyYolkin’s stale review March 2, 2026 19:32

The base branch was changed.

@J-Sek J-Sek force-pushed the feat/css-variables-for-fonts branch from dcbe0df to 858eb31 Compare March 2, 2026 19:33
@J-Sek J-Sek merged commit 84495a3 into master Mar 2, 2026
16 checks passed
@J-Sek J-Sek deleted the feat/css-variables-for-fonts branch March 2, 2026 22:06
@KaelWD KaelWD added this to the v4.0.x milestone Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sass T: feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants