Open felquis opened 9 years ago
Ops, sorry for duplicated issue https://github.com/amcss/attribute-module-specification/issues/13
For things like these (state modifiers) I just use classes, scoped to the module itself.
[am-Module] {} // component
[am-Module].on {} // state modifier
[am-Module~="modifier"] {} // modifier
[am-Module-part] {}
[am-Module-anotherPart] {}
I was thinking that there's no way to treat
dataset
values likeclassList
DOMTokenList
In the CSS we can do
element.classList.remove('class-name')
, alsotoggle
,add
,contains
. Usingdataset
, we don't have this super power, we'll have to use something just like thisI don't know if it's possible to use DOMTokenList with another string because I can't do
a = new DOMTokenList(str)
.... :/