Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added CSS not cascadded after screen is built #1655

Closed
NathanaelA opened this issue Feb 26, 2016 · 2 comments
Closed

Added CSS not cascadded after screen is built #1655

NathanaelA opened this issue Feb 26, 2016 · 2 comments

Comments

@NathanaelA
Copy link
Contributor

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";
};
nsndeck pushed a commit that referenced this issue Jun 16, 2016
nsndeck pushed a commit that referenced this issue Jun 17, 2016
…rsIssue

Fixed issue #1655 cascading css selectors.
@nsndeck
Copy link

nsndeck commented Jun 17, 2016

Issue fixed with commit #2324.

@lock
Copy link

lock bot commented Aug 29, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Aug 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants