Go to main content
Gå till KtH intranätGå till KtH intranät

Bootstrap compatibility

How to have both "kth-style" and "@kth/style" packages in the same project

If you are importing the entire kth-bootstrap.scss

  1. Declare CSS layers old-kth-style and kth-style

    // Import @kth/style artifacts
    @use "@kth/style/scss/..."
    
    + @layer old-kth-style, kth-style;
    
    // Import kth-style
    @import "kth-style/public/scss/kth-bootstrap.scss";
  2. Import dist/kth-bootstrap.css instead of the .scss file, and add it to the old-kth-style layer:

    - @import "kth-style/public/scss/kth-bootstrap.scss";
    + @import "kth-style/dist/kth-bootstrap.css" layer(old-kth-style);

Read more: