I suspected as much, and that really is a shame because it cripples the
declaration based behavior. The parser could of course declare any property it
does not know at the time of parsing as needed to be looked up. Ultimately I
cannot move the colorschemes into a separate file, so they are
Hm. That would mean this should work, but it does not. So instead of moving the
lines 216 and up to a separate file, I moved them to the front, but the
colorschemes are not working then. The lines must be after the first
(.SimpleMetroArcGauge) block. I don't understand why this matters, if it
Yes. The details are in
http://www.w3.org/TR/CSS2/cascade.html#cascading-order, but here is the
excerpt that matters: if two declarations have the same weight, origin
and specificity, the latter specified wins. Declarations in imported
style sheets are considered to be before any declarations
Take -fxx-needle-color (from SimpleMetroArcGauge.css) as an example. Its
declaration appears in the .SimpleMetroArcGauge rule and is then used in
the -fx-fill declaration of the .needle rule. The CSS parser is pretty
dumb. It collects up the property names as it parses and if any of those
The spec says that if there is an @import it has to appear first before
any rule, except @charset, if present.
On 4/8/15 5:12 PM, Tom Eugelink wrote:
I'm currently porting and reworking some gauges from Enzo to JFXtras.
One of things that gets reworked involves that all gauges will have
I'm currently porting and reworking some gauges from Enzo to JFXtras. One of
things that gets reworked involves that all gauges will have custom colored
segments. These segments can be preset using colorschemes (e.g. green to red in
10 steps), so the CSS for these colors are shared over all
Does the order in which things appear in a CSS have influence on the behavior?
Tom
On 8-4-2015 23:22, David Grieve wrote:
The spec says that if there is an @import it has to appear first before any
rule, except @charset, if present.
On 4/8/15 5:12 PM, Tom Eugelink wrote:
I'm currently