Have a setting - can be on the component, page or application level (don't mind) - so that when set to True the controls do not add any in-line styles.
But if CSS is needed to create some specific look & feel, how should it be handled then?
That's the point. CSS is needed to create a specific look and feel, not in-line styles.
The element class is what should control the look and feel and that should be supported with a .css file, or if you really must a css section in the page.
I suggest an optional attribute because some developers might rely on it on not do any design work.
If you ask for no inline styles then it is up to the developer / designer to handle it. All our pages are templated and supported by CSS, so the element classes are all that is needed. I know our designer fights with the auto created in line styles. I one case adding a script into the template to strip them all out.
Are you suggesting there are styles being added automatically with built-in controls and that you've not been able to override them with CSS rules? I've been working with a lot of CSS and I can't think of a situation where I've not been able to get CSS to do whatever it was I needed.
Yes, the inline styles are being added automatically in some instances as far as I can see. We work around them so that we can get CSS to do whatever we want, but it would be easier without them.
Sure, but you should be able to work around them with just CSS, not having to strip them of anything using your app (or JavaScript). Just with more specific rules, right? Might be a bit of a nuisance, but no more than CSS specificity rules already are. I don't add any styling in the IDE though, generally, so maybe this is the problem? Like if you set the button to blue, in the IDE, you can't then change it in CSS?
I'll get the low down from our designer on that. But leaving them out would be a lot cleaner and less of a nuisance.
We don't add any styling in the ide and strip out any that is filled in by default.
We only use it when really needed to create some kind of needed layout