In a NativeScript app I'm trying to apply some global styles that will be shared across the app.
This is my structure:
- styles
- partials
- _buttons.scss
- _exports.scss
_buttons.scss:
.flt-btn {
border-radius: 35px;
}
_exports.scss:
@import '_buttons.scss';
app.css:
@import './styles/partials/_exports.scss';
As you can see the the styles for .flt-btn
should be applied, but they're not.
I'm using the class in a feature module that's lazy loaded, login
like this:
<Button class="flt-btn" text="A button"></Button>
If I put the btn styles directly in app.css
without any imports it works, but since this is a css file I can't use scss in it. So I'm not sure if the imports will ever work by doing it like this.
How can I make sure that the styles from the partials imports are applied application-wide?
EDIT:
I found this, which successfully imports my own styles into app.android.css
and app.ios.css
files. BUT.. After I've installed SASS and done this the app is just completely blank when I run it in the emulator, both in android and ios.
I get no errors, nothing. Has anyone successfully been able to get sass working like this? Please let me know how and thou shalt be rewarded.
EDIT 2:
It looks like the app is running, because I can successfully log something in the app.component.ts
's constructor, so I'm guessing that something is causing all the elements on the page to disappear with the new styles settings.