I think this is a simple one for someone who understands how CSS works better than I… I want to style the font color as red within an edit-text widget. It works until I give edit-text the “tag” of “input” which the docs say is how you do a single line. Once I do that the color doesn’t work unless I add the ! important which we always try to avoid. I think the answer is some modification of css definition, but I can’t find anything on this.
This works for color, but isn’t the single-line edit-text:
Naming the class based on the fieldname could potentially result in many classes, all with the same attributes.
I think that a more mnemonic convention is to define classes named after their purpose, such as “no-outline”, “width100”, “width50”, “width33”, “width25”, etc. like this:
Thanks @EricShulman I see value in a combination of our two approaches.
In a custom wiki or tool eg contact manager, maybe only a dozen or so fields need be defined and since we know the field name we automatically know the classname, this is perhaps the “semantic approach”, but as you say if its the fit for purpose classes, the “functional approach”, each which can be combined this will often be more than enough. As in the OT.
I often have wondered if it is possible to define a class that is defined by multiple classes. Then one could bring together multiple classes into one, so you only set the “meta class”, but I expect this is part of my CSS ignorance. Because I have not found a way to do it.