Does twitter bootstrap work in Nativescript environment?
In short: No.
Longer version: Bootstrap is a CSS framework designed for html. NativeScript doesn't use HTML. NativeScript has its own set of user interface elements.
-
Bootstrap has many properties that are not supported by NativeScript. NativeScript actually supports a very small subset of CSS properties . This means that things such as
font-size: ...
,border-radius: ...
,font-weight: ...
,display: ...
etc., will not operate. -
There are many values ββin Bootstrap that are not supported by NativeScript. For example.
width: 100%;
won't work as there is no percentage value in NativeScript. Orwidth: 1170px;
, since there are no pixels in NativeScript. -
Bootstrap has many selectors that select HTML fields. Remember, there are no things like HTML fields in NativeScript. This means that all the HTML selectors, such as
a
,input
,table
,p
etc., will not operate. The elements simply don't exist.
There is no way to get Bootstrap (or any other browser crafted framework) working with NativeScript. The best thing if you like the look and feel of Bootstrap is to start a new job and create your own "framework" specifically for NativeScript and make the most of Bootstrap (even if you currently can't get a 1 to 1 match).
source to share