Trouble Styling Nodes
See original GitHub issueI’m using this for a simple dynamic tree that the user can add and subtract nodes from and I’ve been trying to create my own custom styling, but it doesn’t seem to be overriding any of the other styles. I’ve tried adding classes to the selector as well, but it doesn’t seem to work.
CSS
#mytree{ background-color: red!important; }
HTML in Component
<tree-root id="mytree" [nodes]="nodes" [options]="options">
<template #treeNodeTemplate let-node="node" let-index="index">
...html content...
</template>
</tree-root>
I’m linking it to my component via the styleUrls. My goal is to color code the background color of some of the nodes.
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Trouble Styling Nodes · Issue #212 - GitHub
I'm using this for a simple dynamic tree that the user can add and subtract nodes from and I've been trying to create...
Read more >problem styling all nodes (table rows) in a table across ...
i am using DataTables plug-in inside a form for multiple row selection.
Read more >Styling span textnode without styling child nodes
So I'm creating a theme plugin for a forum where users often enter text with custom coloring. This is implemented as an inline...
Read more >New color styling options with [TH] Nodes - ThemeHouse
Ian from ThemeHouse shows off the new styling options with the latest version of the [TH] Nodes add-on for XenForo 2.
Read more >[TH] Nodes for grid, custom styling, and custom icons - XenForo
[TH] Nodes for grid, custom styling, and custom icons 1.1.1 Patch Level 1 · Navigate to a forum or sub-forum faster by clicking...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Hesesses, did you wrap you css into a deep rule ? Because I believe styling is on sub components right ?
Regards
@Edge1039 I needed the same the other day, here’s how it can be done:
Then, you can put any kind of styling logic in
getNodeClass(node)
method, like this for example:In the end, you just have to define your styles - Here’s my scss: