antd-scss-theme-plugin icon indicating copy to clipboard operation
antd-scss-theme-plugin copied to clipboard

Import of another scss is not working

Open nettiopsu opened this issue 5 years ago • 5 comments

Hello!

I am trying to import another scss file with partials into theme.scss. It seems this is not supported?

Use case: There are multiple websites under the same brand. They share same logo, fonts and so on. However, parameters like website colors can vary from site to site, since they have different content

I would like to have a theme file with same basics: fonts, sizes, line heights and so on, which differ from standard

I want to be able to extend this theme with other colors and some other parameters.

This plugin returns me this errors for import at the moment:

Could not compile the SCSS theme file "./theme.scss" for the purpose of variable extraction. This is likely because it contains a Sass error.

Error: Invalid CSS after "...test { content:": expected expression (e.g. 1px, bold), was '@import "../src/bas'\n on line 1 of stdin\n>> .test { content: @import "../src/base-theme.scss" }

theme.scss:

@import "../src/base-theme.scss";
$primary-color: yellow;

Is there some workaround for it?

nettiopsu avatar Jan 10 '19 10:01 nettiopsu

It seems that it is supported in scss-to-json library (which is used in this project) as "dependencies" parameter: https://github.com/ryanbahniuk/scss-to-json

nettiopsu avatar Jan 10 '19 11:01 nettiopsu

@nettiopsu hi! we're you able to solve this issue? i hope you could share your solution

vrsotto avatar Sep 07 '19 15:09 vrsotto

any update on this ?

mazeeblanke avatar Oct 23 '19 20:10 mazeeblanke

I followed this https://dailyjsx.com/antd-rescript-sass-boilerplate -- and address my problem in https://github.com/nadunindunil/antd-rescripts-boilerplate/issues/1

vrsotto avatar Oct 24 '19 08:10 vrsotto

Same problem here 🙋🏻‍♂️ Any solution?

mrszympek avatar Dec 11 '19 10:12 mrszympek