The current BioDAS-heritage stylesheet system is reaching its limits.
Neither the DAS XML syntax nor the Biodalliance-specific "JSON" syntax (which is really just a serialisation of how we represent stylesheets internally) are friendly for humans to write.
Because a given feature can only be styled by a single style rule, even fairly simple things can mean quite verbose stylesheets.
Only certain feature properties can be used to select style rules.
Support for semantic zooming is limited.
There is only minimal control of the axes used for displaying quantitative data.
Therefore it's time for a new system!
Basic ideas:
CSS-like syntax (can we reuse a CSS parser?)
CSS-like cascading. One feature can match multiple rules. Configured stylesheets will override, rather than completely replace, the default stylesheet.
Selectors based on arbitrary feature properties, zoom level, and maybe other bits of browser state (an easy way to add custom "toggles" to tracks?)
The hope is that we can implement version 1 of this without making any changes to the renderer. There will be a new Tier.styleForFeature method, which behaves something like "getComputedStyle" in the CSS world. Doing things this way means that we'll be able to leave the old styleForFeature in place, allowing a gradual switchover from old to new stylesheets.
Comments and suggestions are very welcome -- please reply to this issue.
I'll aim to post some example stylesheets before starting work.
The current BioDAS-heritage stylesheet system is reaching its limits.
Therefore it's time for a new system!
Basic ideas:
The hope is that we can implement version 1 of this without making any changes to the renderer. There will be a new Tier.styleForFeature method, which behaves something like "getComputedStyle" in the CSS world. Doing things this way means that we'll be able to leave the old styleForFeature in place, allowing a gradual switchover from old to new stylesheets.
Comments and suggestions are very welcome -- please reply to this issue.
I'll aim to post some example stylesheets before starting work.