nativescript-dev-sass
nativescript-dev-sass copied to clipboard
Support import of CSS in SCSS
Nativescript 3.4.0 try to import a theme @import 'nativescript-theme-core/css/core.dark.css'; Actual: The theme is not going to be applied The generated code will be: @import url(/Users/vhristov/Downloads/NSPlayground/app/nativescript-theme-core/css/core.dark.css);
- quotes are missing
- it seems that the full path is not working
Hi @vhristov5555 ,
Could you try to import the scss file instead of the css? I.e.: @import '~nativescript-theme-core/scss/dark'.
Read more about SASS Usage in NativeScript documentation.
Hi,
Importing scss file is working @import '~nativescript-theme-core/scss/dark'. But in some cases you might want to import a css file. In case you decide to switch to scss from css or you want to use some existing css.
I'm marking support for importing css in scss as a feature.
is there any workaround ?
using @import '~nativescript-theme-core/css/dark' gives below error
Error: File to import not found or unreadable: E:\nativescript\HelloWorld
node_modules\nativescript-theme-core\css\dark.
Parent style sheet: E:/nativescript/HelloWorld/app/app.scss
on line 1 of app/app.scss
any workaround available?
this fails with the file not found error :
@import '~nativescript-theme-core/scss/dark';
this works but it is useless from within a scss file :
@import '~nativescript-theme-core/css/dark.css';
I am only working in scss so i need the first one to work.
@bhavincb @T0T4R4 The sample demo in the plugin's repo imports the light theme without any issues using your approach. Can you provide a demo that reproduces the issues you experience? Notice that v1.5.0 of the plugin has been released.
hii @zbranzov ,
mine problem is solved by installing node-sass
globally.