The idea is that a formStyling.js could be included that would scan all the necessary form elements when the document is ready and apply the styles appropriately. This way, you don’t need any additional markup on the form elements (like applying a "text" class to text inputs, etc., etc.). Also, you’d be able to change the actual name of the class or how and when the classes are applied from a central location; otherwise, when the name of a class or when it gets applied changes you’d have to change every instance throughout your application.
So, what do you all think about this approach? I’m sure there are drawbacks. Just a little discussion.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
*May or may not contain any actual "CSS" or "Tricks".