Styling the UI
The primary method to style our applications is the NativeScript variation on Cascading Style Sheets (CSS). If you are familiar with developing on a browser, then you should be right at home in NativeScript. If not, we will be walking you through a couple of examples to show how CSS works.
The NativeScript CSS has some differences from the normal CSS, but overall, it works pretty similar to how a browser does. How about we get started and discuss the what, why, how, and which of CSS. What is CSS, why use it, how is CSS applied, and finally, which properties does NativeScript currently support? Then, we will finish by looking at the main application wide app.css
file to see how it is applied to our application.
What is CSS?
CSS is a styling language designed to allow you to create the presentation rules for a marked up file. In plain English, it allows you to separate your styles (that is, colors, sizes, positioning) from your markup (that is, the Declarative UI elements like...