Idea: Conditional Styles Attributes

  • 4
  • Idea
  • Updated 5 months ago
It would be nice if, when designating style attributes, if on the attribute you could also designate a condition that activates the attribute. For example attribute color: white only if a checkbox from a model on the page is true and a separate attribute color: red only if the checkbox is false. Similar set up to conditional enabling of fields in a field editor.
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb

Posted 2 years ago

  • 4
Photo of Matt Small

Matt Small

  • 1,182 Points 1k badge 2x thumb
Hey this is a great idea! I would use this all the time.
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Definitely want this. Even if it was only the ability to use context-aware conditional merge syntax inside the style properties, that would be a start in the right direction.
Photo of John Dahlberg

John Dahlberg, Champion

  • 2,442 Points 2k badge 2x thumb
This looks similar to this post.  FYI, you can use merge syntax on some component definitions in the page builder.

https://community.skuid.com/skuid/topics/conditional-css-deck
(Edited)