Topic: Input tag without type attribute should still be styled

Xeevis pro asked 6 years ago

MDB is styling using input[type=text] rule, this is however prone to many problems. This particular attribute type="text" on input tag is redundant as per W3C specification, it's implicit. It means that most code refactoring tools will simply strip it down to reduce html size. It happened to me with HTML minifiers and now with simple ASP.NET. So even if my cshtml view has <input type="text" id="form2" class="form-control"> output is automatically simplified to <input id="form2" class="form-control"> making the input box unstyled ... If simple input rule is a problem, I'd like to suggest adding input that has no type attribute to be treated the same as one with type=text ... input:not([type]), input[type='text']

Kamil Paciepnik free answered 6 years ago

Hi Xeevis, Thanks for the suggestion. We will consider your solution when releasing next packages. Regards

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.


Specification of the issue

  • User: Pro
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: Yes
  • Provided link: No