> Based on discussions I have seen folks were also thinking about CSS-like
> styling.

By "CSS-like", I simply meant that we might want to consider supporting a 
feature similar to CSS classes. I did not mean that we would attempt to support 
CSS syntax or replicate any other CSS behaviors.

> This uses JSON as the backing store for styling content. Currently,
> pivot supports styling form json files using a special @ notation, directly
> specified in strings through JSON, and now as proposed using inherited
> styling with style sheets as well as combining styles in a string-based DSL
> with classpath resources and URL implied notation.

The '@' syntax is not specific to styles. It is one of BeanSerializer's 
resolution operators. While JSON-formatted styles could be considered a DSL, it 
is really just the encoding supported by Component#setStyles(String).

> I think simple was left behind awhile ago.

It is actually pretty simple. There is one primary way to set styles - via 
Component.StyleDictionary. However, as with many things in BXML, there are 
multiple ways to accomplish the same thing.

> There are two issues around styling discussed below: specifying styling and
> getting the right styling information to the right component at the right
> time.

They aren't really two separate issues. Styling is applied whenever the 
component's style dictionary is modified. The "right" information is simply the 
information you pass to the style dictionary at that time.

> Pluggable *could* mean changing the style property to a StyleProvider
> interface and making StyleProvider have one method that says Map<String, ?>
> getStyles().

This is the unnecessary complexity Noel is talking about. The current styling 
mechanism is well defined and is already pretty flexible. This approach seems 
like it is intended to address a hypothetical use case, which, as I have said 
before, we try to stay away from in Pivot.

G

Reply via email to