Does twitter bootstrap work in Nativescript environment?

I know nativescript is used to support a subset of the CSS standard. Does twitter bootstrap work on the latest Nativescript? If not, is there any plan to make it work?

+3


source to share


2 answers


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. Or width: 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).

+9


source


While this is theoretically possible, I doubt it will work out of the box. Here you can see what CSS attributes are supported.



https://github.com/NativeScript/docs/blob/master/styling.md

+1


source







All Articles