Alloy selectors provide ways to overload style rules based on switches (formFactor, OS, conditional rules, etc.). Say the TSS is somehow:
The generated code will look like:
If this works fine with most of the properties, this is particularly annoying with font or nested properties. For instance,
will result in the font name being simply ignored on tablets, as .extend() is not a deepExtend method. We're lucky, Alloy provides a deepExtend() implementation which we may want to use. I therefore propose to switch from .extend() to Alloy's deepExtend implementation. This will allow much more efficient ways of integrating complex graphical interfaces, with style inheritances all across the app:
All styles are merged deeply, and it becomes unnecessary to repeat over and over the font name.
I know that this change may break many tests, but I strongly believe that this behavior is the right way styles should work, in the sake for development efficiency.