Skip to content

Custom theme using Sass for v2 - Documentation is incorrect #426

Answered by edheltzel
edheltzel asked this question in Help
Discussion options

You must be logged in to vote

@sysmat
The v2 documentation is lacking and needs to be updated. @lucaslarroche

I had to re-read the Sass documentation on how to use @use and @forward, but this is what I've done to get Pico working as a node_module with my custom theme.

This is my app.scss:

/**
 * App Style Sheet
 */

@use "pico" with (
  $css-var-prefix: "--autopilot-",
  $enable-semantic-container: true,
  $enable-classes: true,
  $modules: (
    "themes/default": true,
  )
);

// Theme 
@use "themes/autopilot";  // 👈 this must come after 

Then, in my custom theme, themes/autopilot/_autopilot.scss (which is just a copy of the Pico default theme), I update the imports:

// Styles
@use "autopilot/styles";

// Color schemes

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
5 replies
@edheltzel
Comment options

Answer selected by edheltzel
@sysmat
Comment options

@wbadart
Comment options

@edheltzel
Comment options

@wbadart
Comment options

Comment options

You must be logged in to vote
1 reply
@edheltzel
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
4 participants