OR
A, B {}
AND
AB {}
NOT
:not(A) {}
NOR
:not(A, B) {} /* Currently undefined syntax */
That way is so simply, but can't it nowοΌ
Selectors Level 4 which is under working draft, defined this syntax.
At such times De Morgan's law is convenient.
Since NOR is "NOT A
" AND "NOT B
", it can be written as follows.
:not(A):not(B) {}
If there are three or more selectors, the selector becomes dirty.γI hope to be implemented Selectors Level 4.
NAND
It's simpler then NORοΌ
:not(AB) {}
Adapting Domorgan's law in the same way as NOR, so
:not(A), :not(B) {}
is OK.
XOR
XOR is "A
AND NOT B
" OR "NOT A
AND B
", so it can be written as follows.
A:not(B), :not(A)B {}
(Maybe, A:not(B), B:not(A)
is simpler.)
Impression
Actually, I was thinking about doing NOR things and started thinking about this at the trigger.
When doing something complicated, it seems to be easy to deal with remembering aggregate logic and doing this kind of things.
Top comments (0)