Add the ability to define skinning variables so things like colors can be
abstract configurations not tied to specific color uses like border-color
---------------------------------------------------------------------------------------------------------------------------------------------------
Key: TRINIDAD-1871
URL: https://issues.apache.org/jira/browse/TRINIDAD-1871
Project: MyFaces Trinidad
Issue Type: Improvement
Components: Skinning
Affects Versions: 2.0.0-alpha
Reporter: Matt Cooper
A nice skinning enhancement would be to add the ability to define skinning
variables so things like colors can be abstract configurations not tied to
specific color uses like border-color.
For discussion purposes, let's say one of these variables is defined like this:
.AFSomeColor:variable {
#aabbcc;
}
Notice that there is nothing forcing this color to be tied to a specific style
property. It is just an abstract global location for defining a given color
value (or background image, dimension, etc.).
It is important to note that some variable may have spaces in their value.
I'm also not trying to force a syntax with this example so there may be a
better syntax but what you see here is just one example to get the idea across.
Anyhow, once you have this variable defined, you can then use it anywhere you
would type in a style value, e.g.:
af|table::column-resize-indicator {
border-right: 2px dotted -tr-variable-ref(".AFSomeColor:variable");
}
then someone else could do this with the same variable:
af|someCustomComponent {
background-color: -tr-variable-ref(".AFSomeColor:variable");
}
or even use that same color value in some future CSS property, e.g.:
af|someCustomComponent {
-fancy-browser-custom-property: -tr-variable-ref(".AFSomeColor:variable");
}
If we abstracted our skins into some core variables, it would be super easy for
someone to create a new skin by just changing a small number of color value
variables.
If we really wanted to take this to a further level, we could apply transforms
to these variables. So for example, if someone defines a color variable in one
location, selectors throughout the skin could consume that color variable but
perform a transform on it, e.g. blend it a certain amount from that color to
another color variable to create a color that is halfway between 2 colors, or
to produce a desaturated version of that color value, etc. If this sounds too
much like scope creep, this can be spun off into its own JIRA issue but I
mention it here in case it has any impact on how this skin variable idea gets
implemented.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.