- ππΊHungary pasqualle ππΊ Budapest
I am thinking of simple square brackets for using a class instead of style color in field widget.
for example:
info|Info/[has-background-info] success|Success/[has-background-success] warning|Warning/[has-background-warning] danger|Error/[has-background-danger]
- πΊπΈUnited States justcaldwell Austin, Texas
Yeah, it seems like the brackets would be a simple way to differentiate between color and class values.
The next question, though, is do you plan to style the widget so that it provides a visual representation of the styles available for selection (as it does for color now)? If no, then it seems like you're just providing a dropdown list of classes (?), and I think that could be done with a core 'List (text)' field.
If yes, you need a way to get the CSS for those classes into the admin theme so it can be used to style the widget. As I said in #8, doing that starts to get complicated and that's why I ended up creating a new module β to add that use case.