Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

how could I set more than one type of input style in CSS in the same brackets(not big parentheses)?

I am trying to make a Web UI framework and when I deal with input , I have to write the type over and over again with the same style. In that case, I want to put them together to shink the size of the file.

This is my code:

input[class=tUI][type=date],[class=tUI][type=month],[class=tUI][type=week],[class=tUI][type=time] {
  background:red;
}
<input type="week" class="tUI">

I want to define the type by just using one Brackets. For example, I want input[class=tUI][type=date || week || month] by just using CSS

How could I get that? Or is it possible?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

input.tUI:is([type=date],[type=month],[type=week],[type=time]) {
  background:red;
}
<input type="week" class="tUI" />
<input type="date" class="tUI" />
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading