following the selector@attribute syntax we could have:
"selector?classname" : "dataname".
shorthand for
"selector@class+" : function(){ this.dataname? " classname" : "" }
(ideal world, remove class if present)
"?classname" : "dataname". would behave like " @attribute" : value
"selector?" : "dataname"
shorthand for
"selector@style+" : function(){ this.dataname? " display:none" : "" }
--
"selector@?property" : "dataname"
conditional include property. Like "checked" "disabled" or [data-decoration] attribute.
"selector??" : "dataname"
conditional skip the element from output
-------
for the two first rule (shorthand part) this could mean something like
selRx = /^(\+)?([^\@\+\?]+)?(\@)?(\?])?([^\+]+)?(\+)?$/,
m = sel.match(selRx);
prepend = !! m[1];
selector = m[2];
isattr = !!m[3]
iscond = !!m[4]
attr = m[5];
append = !! m[6];
if( iscond && !isattr){
if(attr.length){
cond_data = " "+attr
attr = "class"
append = true
}else{
cond_data = " display:none"
attr = "style"
append = true
}
}