When attempting to create platform-specific CSS for my app component, I encountered an error. While my android.css file is functioning properly, the common.css file is not working. Any insights as to why this may be happening?
JS: Error: /app.component.common.css does not start with /data/data/org.nativescript.portalestapp/files/app
JS: Error: Could not load CSS from /app.component.common.css: Error: require's first parameter should be string
The files I have include:
- app.component.html
- app.component.ts
- app.component.common.css
- app.component.android.css
- app.component.ios.css
In app.component.ts :
@Component({
selector: "ns-app",
moduleId: module.id,
templateUrl: "app.component.html",
styleUrls: ["./app.component.css"]
})
In app.component.common.css :
.page{
background-color: #F4F5F7;
font-family:Poppins-Regular, Poppins
}
.custom-action-bar {
background-color:transparent;
}
In app.component.android.css :
@import "/app.component.common.css";
.page {
background-color: #fffffffa;
}