And then with a separate behavior sheet.
<img src=Cheddar.png alt="Pungent Orange Cheddar Cheese" data-type=food-dairy-cheese-cheddar data-smell=pungent data-color=orange>
And the Behavior Sheet
<style type="text/behavior2.0">
[data-type|=food-dairy-cheese]{
@behavior Sing {
type: show tune;
speed: fast;
}
@behavior Dance {
type: waltz;
speed: slow
}
}
</style>
Or flat…
<style type="text/behavior2.0">
[data-type|=food-dairy-cheese]{
sing-type: showtune;
sing-speed: fast;
dance-type: waltz;
dance-speed: slow
}
</style>
Or flat with shortcuts!
<style type="text/behavior2.0">
[data-type|=food-dairy-cheese]{
sing: showtune fast;
dance: waltz slow
}
</style>
Or as JSON
<script type="text/behavior-json2.0" charset="utf-8">
{
"[data-type|=food-dairy-cheese]": {
"sing": ["showtune", "fast"],
"dance": ["waltz", "slow"]
}
}
</script>
Cf. https://gist.github.com/759332 for info around the best options for declarative syntax.