Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
- CLI: 5.4.0
- Cross-platform modules:
- Android Runtime: 5.4.0
- iOS Runtime:
- Plugin(s):
- NativeScript-Angular: 7.2.4
- Angular: 7.2.15
Describe the bug
The :host css selector only works first time, after that that the selector is ignored for the component.
To Reproduce
- Use
:host in a components stylesheet.
- Use the component more than once.
- The style is ignored.
Expected behavior
I'd expect the style to be applied to every instance of the component.
Sample project
I've made a small project with a ListView and an item-component here:
https://play.nativescript.org/?template=play-ng&id=NXYfcY&v=15
All the items should have: background-color = green, color = black, text centered, font-weight = normal and padding = 8.
But only the first item looks like that the others have: background-color: blue, color = white, text right aligned, font-weight = bold and no padding.
Additional context
Environment
Provide version numbers for the following components (information can be retrieved by running
tns infoin your project folder or by inspecting thepackage.jsonof the project):Describe the bug
The
:hostcss selector only works first time, after that that the selector is ignored for the component.To Reproduce
:hostin a components stylesheet.Expected behavior
I'd expect the style to be applied to every instance of the component.
Sample project
I've made a small project with a
ListViewand an item-component here:https://play.nativescript.org/?template=play-ng&id=NXYfcY&v=15
All the items should have: background-color = green, color = black, text centered, font-weight = normal and padding = 8.
But only the first item looks like that the others have: background-color: blue, color = white, text right aligned, font-weight = bold and no padding.
Additional context