Skip to content

docs: configure SASS variables through styles.configFile - #402

Open
AndreyYolkin wants to merge 1 commit into
mainfrom
docs/sass-variables-config-file
Open

AndreyYolkin wants to merge 1 commit into
mainfrom
docs/sass-variables-config-file

Conversation

@AndreyYolkin

@AndreyYolkin AndreyYolkin commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Refs #392.

Problem

The SASS Customization page told users to configure Vuetify with @use 'vuetify' with (...) in a globals.scss listed in the Nuxt css option. It never mentioned styles.configFile.

That file compiles a second full copy of Vuetify's styles. The module adds its own copy after the user's css entries, in the same cascade layer, so the module's copy wins:

  • without styles.configFile it is the precompiled vuetify/styles/core, which ignores SASS variables;
  • with styles.configFile it is compiled with the settings file, so variables set only in globals.scss fall back to the defaults.

The result is what #392 reports: component variables apply, while $body-font-family and $font-size-root stay at Roboto / 1rem.

Changes

  • docs/guide/styling/sass.md: document one settings file passed to styles.configFile for both global and component variables, add a warning against loading a second copy of the styles, and add short notes on $typography merging and font loading.
  • docs/guide/features/ssr.md: remove the section that advised disabling features.inlineStyles with configFile and SSR. It is no longer needed; the styles-ssr e2e suite covers configFile with the default setting.

Verification

Reproduced on Vuetify 4.3.4 with SSR in a temporary fixture, in dev mode in a browser:

Setup Computed html
styles: true + globals.scss with @use 'vuetify' with (...) Roboto, 16px
styles.configFile with all variables in the settings file Work Sans, 18px

A production build of styles.configFile plus the extra globals.scss showed the same ordering: both copies end up in one stylesheet, the module's copy last.

The docs site build was not run.

The SASS page told users to configure Vuetify with `@use 'vuetify' with (...)`
in a file listed in `css`. That compiles a second copy of Vuetify's styles, and
the copy the module adds is loaded after it, so global variables such as
$body-font-family fell back to the defaults (#392).

Document a single settings file passed to `styles.configFile` instead, warn
against the second copy, and drop the outdated advice to disable
`features.inlineStyles` with SSR.

This branch has not been deployed

No deployments
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.

1 participant