active-css
active-css copied to clipboard
New has-attribute conditional
A current solution:
#something:click {
body {
toggle-attribute: data-something;
}
body[data-something] #something {
render: "Not something";
}
body:not([data-something]) #something {
render: "Something";
}
}
This could then become, following the same syntax as has-class:
#something:click {
body {
toggle-attribute: data-something;
}
@if (has-attribute(body data-something)) {
render: "Not something";
} @else {
render: "Something";
}
}
No rush on this.
Very nice!
Now on branch.
Excellent!