NativeScript: Multiple class selector syntax doesn't work in CSS

tl;dr: using .class1.class2 { } syntax in CSS doesn’t seem to work. This syntax represents the requirement of styles to be applied to an element having both class1 and class2 classes simultaneously.

So here’s the XML and CSS bits needed to replicate this issue:

<Label text="First class applied" class="first"/>
<Label text="Second class applied" class="second"/>
<Label text="Both classes applied" class="first second"/>
.first {
    color: #FF0000;
}

.second {
    color: #00FF00;
}

.first.second {
    color: #0000FF;
}

The first and second Label elements look like they should. The third Label should be blue instead of green. That third CSS rule doesn’t seem to be working.

Platform: Both CLI: 1.7.1 Cross-platform modules: 1.7.1 tns-ios: 1.7.0 tns-android: 1.7.1

No third-party plugins being used.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 3
  • Comments: 15 (9 by maintainers)

Most upvoted comments

@NickIliev @PanayotCankov I’m testing against master now and multiple class selectors seem to be working as expected so far!