nui
nui copied to clipboard
Inheritance by stylesheet rules
Hi
Just wanted to ask if there is some possibility that a style StyleA:StyleB:StyleC which I define in nss file will be respected on an element with nuiClass = StyleC? Right now i'm setting inheritance by applying nuiClass = StyleA:StyleB:StyleC but it would be great if i could just set niuClass = StyleC and the .nss defined style would inherit form StyleA:StyleB automatically (like it is in css).
Cheers
+1
:+1:
Additional thought:
- the
readme
is doesn't explain well whereButton:LargeButton
belongs in thenuiClass =
or in the.nss
- I cannot get inheritance to work either way
+1 - Imho, at the moment, inheritance is the most important feature missing to NUI.
+1. To me it's not clear how to specify inheritance in the .nss I tried writing SuperClass:Subclass in the .nss, but it doesn't even get parsed.
I got it to work, by specifying classes as independent in the .nss and then expliciting the inheritance in code.
Example:
H3Item {
font-name: @primaryFontName;
font-size: @h3FontSize;
font-color: @darkGreyColor;
}
/* Subclass of H3Item */
H3Loyalty {
font-color: @loyaltyBlueColor;
}
And in code:
nuiClass = "H3Item:H3Loyalty"
It would be much better IMHO if the inheritance could be specified in the .nss directly, so that it could be given to designers as well, or in general anyway it would be less error-prone.
+1 any update on this?
+1
+1 Was very discouraged, when found out, that inheritance only applies to nuiClass and not selectors themself