VuePress EcosystemVuePress Ecosystem
  • Theme Guidelines
  • theme-default
  • Hope Theme
  • Plume Theme
  • Reco Theme
  • Feature Plugins
  • Markdown Plugins
  • Search Plugins
  • Blog Plugins
  • PWA Plugins
  • Analytics Plugins
  • SEO Plugins
  • Development Plugins
  • Tool Plugins
  • @vuepress/helper
  • English
  • 简体中文
GitHub
  • Theme Guidelines
  • theme-default
  • Hope Theme
  • Plume Theme
  • Reco Theme
  • Feature Plugins
  • Markdown Plugins
  • Search Plugins
  • Blog Plugins
  • PWA Plugins
  • Analytics Plugins
  • SEO Plugins
  • Development Plugins
  • Tool Plugins
  • @vuepress/helper
  • English
  • 简体中文
GitHub
  • active-header-links
  • git
  • palette
  • reading-time
  • rtl
  • Sass Palette
    • Guide
    • Config
  • theme-data
  • toc

Config

Options

id

  • Type: string
  • Required: Yes

Identifier for palette, used to avoid duplicate registration.

config

  • Type: string
  • Default: `.vuepress/styles/${id}-palette.scss`

User config file path, relative to source dir.

Tips

This is the file where user set style variables.

The default filename is starting with ID above.

defaultConfig

  • Type: string
  • Default: "@vuepress/plugin-sass-palette/styles/default/config.scss"

Default config file path, should be absolute path.

Tips

This is the file you should use to provide default values with !default.

palette

  • Type: string
  • Default: `.vuepress/styles/${id}-palette.scss`

User palette file path, relative to source dir.

Tips

This is the file where user control injected CSS variables. All the variables will be converted in to kebab-case and injected.

The default filename is starting with ID above.

defaultPalette

  • Type: string
  • Default: "@vuepress/plugin-sass-palette/styles/default/palette.scss"

Default palette file path, should be absolute path.

Tips

This is the file you should use to provide default CSS variables with !default. All the variable will be converted in to kebab-case and injected.

generator

  • Type: string
  • Required: No

Custom generator, used to generate derivative values with the above config.

E.g.: You may want to provide a $theme-color-light based on $theme-color.

style

  • Type: string
  • Required: No

User style file path, relative to source dir.

Alias

Available alias are:

  • config: @sass-palette/${id}-config (based on id)
  • palette: @sass-palette/${id}-palette (based on id)
  • style: @sass-palette/${id}-style (only available when style option is set)
  • helper: @sass-palette/helper
Edit this page on GitHub
Last Updated:: 1/10/25, 6:07 PM
Contributors: Mister-Hope
Prev
Guide