Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Css :not() selector not supporting complex selectors inside it

With CSS3 both :not() selector as well as attribute contains selector are available, but while mixing the both there comes the problem, it is not working.

HTML:

<input type='text'/>
<input type='text' id="dasd_Date_asd"/>

CSS:

input[type='text']:not(input[id*='Date']) {
    display:none;
}

DEMO

Can anyone tell what is going on wrong here?

Note: There is no privilege given to us for changing the markup.

like image 718
Rajaprabhu Aravindasamy Avatar asked Nov 18 '14 15:11

Rajaprabhu Aravindasamy


1 Answers

You can't use two selectors in not:

input[type='text']:not([id*='Date']) {
  display: none;
}
<input type='text' />
<input type='text' id="dasd_Date_asd" />

Selectors level 3 does not allow anything more than a single simple selector within a :not() pseudo-class.

like image 108
Alex Char Avatar answered Sep 24 '22 15:09

Alex Char