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

Added CSS not cascadded after screen is built · Issue #1655 · NativeScript/NativeScript · GitHub

Added CSS not cascadded after screen is built #1655

Description

Did you verify this is a real problem by searching Stack Overflow and the other open issues in this repo?

Yes

Tell us about the problem

Any additional CSS added to a component doesn't cause children to update.

Which platform(s) does your issue occur on?

Android (but probably both)

Please provide the following version numbers that your issue occurs with:

Core: v1.62
Runtime: v1.62
TNS: v1.61

Please tell us how to recreate the issue in as much detail as possible.

Use the code/xml/js and hit the button. If the child components are refreshed then background on the label should turn green.

To see what it actually should do, manually add the "added" to the page class in the xml and start the app again to see what it looks like if the css existed from the beginning.

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

<Page id="Page" class="">
  <StackLayout>
   <Label id="statusLabel" text="Hi this is a Test and should be green after tap" class ="lab1"/>
   <Button text="tap"  tap="onTap"/>
  </StackLayout>
</Page>
.added {
    background-color: red;
}

.added .lab1 {
    background-color: #9bbb59;
}

.lab1 {
    font-size: 15;
    horizontal-align: center;
}

.test {
    font-size: 10;
    height: 48;
}
var frame = require('ui/frame');

exports.onTap  = function(args) {
    var page = frame.topmost().currentPage.getViewById('Page');
    page.cssClass = "added";
};

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