How to use specific CSS
makeAdance opened this issue · comments
Hi.
I would like to know the following:
What is the right approach of specific CSS usage?
How can I define specific ios/android CSS files in the angular components?
Thanks.
You don't change anything in the angular component. You simple apply a new file name, just like you do through the regular {N} projects.
example.component.tns.android.scss
example.component.tns.ios.scss
Referenced here: https://github.com/TeamMaestro/angular-native-seed/blob/master/nativescript/gulpfile.js#L63
So i can have the following structure in a component:
- example.component.tns.scss --> for both ios/android
- example.component.tns.android.scss --> additional to 1) for specific ios scss
- example.component.tns.android.scss --> additional to 1) for specific android scss
??
And global definitions would be defined in:
nativescript/app/app.ios.scss
nativescript/app/app.android.scss
??
Thanks.
No. It's going to be the same way the core {N} behaves. Which is you need to create a common file between the platforms and import that into each platform-specific scss.
_example.scss
example.component.tns.android.scss
@import 'example';
Sorry; my mistake. I get it. Thank you.