vuetifyjs / vue-cli-plugins

🔌 A collection of Vuetify plugins for Vue CLI
https://vuetifyjs.com/en/getting-started/quick-start#vue-cli-3
Other
428 stars 113 forks source link

Question: in webpack-plugin, why @/sass/variables.scss is @import before vuetify's default styles.sass #234

Closed Dimitri-WEI-Lingfeng closed 3 years ago

Dimitri-WEI-Lingfeng commented 3 years ago

Here is a confusing snippet of the vue inspect result:

{
    prependData: '@import \'@/sass/variables.scss\';\n@import \'~vuetify/src/styles/styles.sass\';'
}

And your source code tells that

// vue-cli-plugin-vuetify/util/helpers.js

// Inject Vuetify styles at the end of user supplied
  data.push(`@import '~vuetify/src/styles/styles.sass${end}`)

If I'm not wrong, the purpose of '@/sass/variables.scss' is to overwrite default variables. But why it is @import before?

KaelWD commented 3 years ago

https://sass-lang.com/documentation/variables#default-values

Dimitri-WEI-Lingfeng commented 3 years ago

@KaelWD Thank you! This rule is unusual.