Device specific styles in vanilla Nativescript(Nativescript Core)


#1

Hi All,

If you want to write the device specific styles based on width then try using ‘page.ios.minW326.css’ file convention it worked for me.
this will apply styles for ios devices which are 326 dp’s(iphone 6 and higher) width or higher.

Thanks.


#2

here is the link in documentation where you have Screen size qualifiers, Platform qualifiers, and Orientation qualifiers
https://docs.nativescript.org/core-concepts/navigation#supporting-multiple-screens


#3

It Does not work with angular

i create 2 file ‘account.login.land.css’ & account.login.port.css’
and i call it in component like this

@Component({
selector: “hp-login”,
moduleId: module.id,
providers:[navigationsService],
templateUrl: “account.login.html”,
styleUrls:[‘account.login.land.css’,‘account.login.port.css’]

})

put it does not work correctly

how can i do it


#4

Hi @Hassan, I am not familiar with NS-angular BTW did u check this thread ?