How to write a CSS Selector selecting elements NOT having a certain attribute?
I have 2 <div>
nodes as follows:
First:
<div class="weEq5" style="will-change; width;"> <button class="_35EW6">
Second:
<div class="weEq5"> <button class="_35EW6">
I need to select the <div>
(with the similar class) and each of them which have a similar descending <button>
but without the style
attribute.
XPath seems working fine as:
//div[@class and not (@style)]/button
I am looking for an equivalent CssSelector.
Trials:
div[class :not(style)]>button (doesn't works).
I have been through the following discussion but they seem to be discarding the class attribute as :not([class])
as in:
- Can I write a CSS selector selecting elements NOT having a certain class?
- Is it possible to define in CSS NOT to apply style if element have certain class? [duplicate]
I was looking in similar lines ending with :not(attribute)
.