CSS Selector Transforms. Allow "#foo [attribte-]"
With "#foo [attribute+]" selector we are able to append values to an attribute.
Just like that with "#foo [attribute-]" remove value from an attribute.
Example:
1.
HTML: <span class="foo andOther" />
Lift code: ".foo [class-]" #> "andOther"
Result: <span class="foo" />
2.
HTML: <span id="myElem" class="foo" />
Lift code: "#myElem [class-]" #> "foo"
Result: <span id="myElem" />
3.
HTML: <span id="myElem" class="foo" />
Lift code: "#myElem [class-]" #> "nonExistedClass"
Result: <span id="myElem" class="foo" />
Thanks so much
Just like that with "#foo [attribute-]" remove value from an attribute.
Example:
1.
HTML: <span class="foo andOther" />
Lift code: ".foo [class-]" #> "andOther"
Result: <span class="foo" />
2.
HTML: <span id="myElem" class="foo" />
Lift code: "#myElem [class-]" #> "foo"
Result: <span id="myElem" />
3.
HTML: <span id="myElem" class="foo" />
Lift code: "#myElem [class-]" #> "nonExistedClass"
Result: <span id="myElem" class="foo" />
Thanks so much
Leave a comment
(In revision:b0b74787772a166417bbdd0998cea2c53146f68e) Closes #1030. Ability to remove attributes or individual parts of a class attribute in CSS Selector Transforms
Branch: master
Branch: master