FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

CSS padding requires background-color in latest tns-core-modules on Android · Issue #2873 · NativeScript/NativeScript · GitHub

CSS padding requires background-color in latest tns-core-modules on Android #2873

Description

At some point between v2.4.0-2016-09-21-4189 and v2.4.0-2016-10-10-4344 of tns-core-modules a strange bug has arisen.

Setting a value for padding in CSS has no effect unless a background-color is also assigned to the element.

Using the template-hello-world starter template you can reproduce as follows:

$ tns plugin remove tns-core-modules

Remove the node_modules, platforms and hooks folders.

$ tns plugin add tns-core-modules@next
$ tns run android

main-page.xml

<Page xmlns="http://schemas.nativescript.org/tns.xsd">

  <GridLayout rows="auto, auto, auto">

    <StackLayout class="test1" row="0">
      <Label text="Test 1" />
    </StackLayout>

    <StackLayout class="test2" row="1">
      <Label text="Test 2" />
    </StackLayout>

    <StackLayout class="test3" row="2">
      <Label text="Test 3" />
    </StackLayout>

  </GridLayout>

</Page>

main-page.css

Page {
    background-color: lightgreen;
}

.test1 {
    padding: 30; /* Doesn't work */
}

.test2 {
    padding: 30;  /* Does work */
    background-color: lightblue;
}

.test3 {
    margin: 30;   /* Does work */
}

Which gives the following results:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL