1

This is the part of my code when I inspect it:

<input disabled="" required="" type="text" ng-reflect-name="id" ng-reflect-model="" class="ng-untouched ng-pristine">

The ng-reflect-model is dynamically filled, upon other action:

<input disabled="" required="" type="text" ng-reflect-name="id" ng-reflect-model="A1" class="ng-untouched ng-pristine">

I need to style this with CSS when the ng-reflect-model is :empty and when it is :not(:empty)

This works:

input[ng-reflect-model]:empty {
//CSS STYLES
}

But this doesn't:

input:not([ng-reflect-model]:empty), input[ng-reflect-model]:not(:empty) {
//CSS STYLES
}

What would be a work-around?

Thanks.

eric.dummy
  • 399
  • 1
  • 8
  • 24
  • `input:empty` means that the `input` has no child elements. Is that what you intended? Maybe you want this: http://stackoverflow.com/questions/16429220/select-elements-where-attribute-is-non-empty – Alex K Mar 21 '17 at 14:11
  • Not really.. doesn't help. – eric.dummy Mar 21 '17 at 14:26
  • 1
    Here's a quick fiddle: https://jsfiddle.net/55k2j4L1/ – Alex K Mar 21 '17 at 14:48
  • As show [here](http://stackoverflow.com/a/8639309/1737263), you can't do that. – Shiva127 Mar 21 '17 at 14:50
  • @AlexK, I can do it with javascript easily mate, but thanks. I wanted to see if there is any CSS hack for this. Please post this as a solution and I'll accept it. Thanks. – eric.dummy Mar 21 '17 at 14:59

0 Answers0