sebastiaanvisser / clay

A CSS preprocessor as embedded Haskell.
Other
357 stars 72 forks source link

Adds Not type class, Fixes #239 #240

Open Skyfold opened 2 years ago

Skyfold commented 2 years ago

The not pseudo selector can only be applied to one argument at a time in most browsers, Safari seems to be the exception. The instance for Not Refinement allows you to apply Not to multiple arguments, however, there is no contaminator to combine two Refinement directly.

Skyfold commented 2 years ago

I've added four simple tests in PseudoSpec.hs

There is one disadvantage to the current type class approach: if you write not ".test" it is ambiguous if the ".test" is a Selector or a Refinement.

turion commented 2 years ago

Yes, that's a disadvantage. Recently, a similar issue was raised: https://github.com/sebastiaanvisser/clay/issues/241