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?
>Solution :
input.tUI:is([type=date],[type=month],[type=week],[type=time]) {
background:red;
}
<input type="week" class="tUI" />
<input type="date" class="tUI" />