Conditional css class property
See original GitHub issueI have seen a lot of class bindings adding css class if condition is true, like: {value: IsActive ? "active" : ""}
. I think we could implement some nicer way to code this behavior, something similar to knockout css binding.
Maybe it could be attribute group, like RouteLink Param-…
<div CssClass-active="{value: IsActive}">
...
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
CSS | Conditional Rules
CSS Conditional Rules are nothing but a feature of CSS in which the CSS style is applied based on a specific condition.
Read more >How to conditionally apply a CSS class? [duplicate]
Variables in CSS should be declared within a CSS selector that defines its scope. For a global scope you can use either the...
Read more >Conditional CSS
In simple words, it's about design that has certain conditions. When one or more conditions are met, the design is subject to change...
Read more >Logic Hop Conditional CSS
Logic Hop's Conditional Not logic allows you to display content when a condition is not met. Conditional Not CSS works exactly the same...
Read more >CSS conditional rules - CSS: Cascading Style Sheets | MDN
The CSS conditional rules module lets you define a set of rules that will only apply based on the capabilities of the processor...
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
Implemented
Example:
@exyi nice feature, i agree with simplified naming