NathanaelA / nativescript-platform-css

A NativeScript plugin to deal with Declarative UI and Platform specific CSS
23 stars 18 forks source link

Added extra info about styling Page #1

Closed lukeramsden closed 7 years ago

NathanaelA commented 7 years ago

@lukeramsden - Thanks for the pull request; but I don't understand the point to that text. The idea behind this plugin is to automatically add the .ios / .android to the Page tag so that your CSS will work per platform.

You don't want to hard code .ios or .android on all your pages as then when you run it on the other platform it will have the wrong platfrom. :grinning:

In addition it now adds the .iosX / .androidX where X is the width, to allow customizations based on the screen size.

lukeramsden commented 7 years ago

@NathanaelA I was trying to say that if you want to style the Page tag, .ios Page {} doesn't work, you have to do .ios {} instead. Also, I do because I wanted a light grey on android and white on iOS.

lukeramsden commented 7 years ago

@NathanaelA Changed it slightly

NathanaelA commented 7 years ago

Ah, I see what you are saying, you are correct!

Better is: Page.ios or Page.android

lukeramsden commented 7 years ago

@NathanaelA Ahhhhhh..... That worked 😂😂 Turns out I was doing Page .android instead of Page.android.... Nevermind then. Stupid whitespace.

NathanaelA commented 7 years ago

Yeah, on the root element that "space" can kill you. Though if you want to do a PR to update the docs to state that, I would merge it. :grinning: If not, I'll add it to my side and then the next time I do an upgrade to the stuff I'll push it. 😀

lukeramsden commented 7 years ago

@NathanaelA Just do it on your side :)