Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inheritance by stylesheet rules #75

Open
1am opened this issue Feb 1, 2013 · 8 comments
Open

Inheritance by stylesheet rules #75

1am opened this issue Feb 1, 2013 · 8 comments

Comments

@1am
Copy link

1am commented Feb 1, 2013

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

@ZugSpi
Copy link

ZugSpi commented Apr 6, 2013

+1

@joelash
Copy link

joelash commented Nov 14, 2013

👍

Additional thought:

  1. the readme is doesn't explain well where Button:LargeButton belongs in the nuiClass = or in the .nss
  2. I cannot get inheritance to work either way

@Altimor
Copy link

Altimor commented Aug 15, 2014

+1 - Imho, at the moment, inheritance is the most important feature missing to NUI.

@vittoriom
Copy link

+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.

@vittoriom
Copy link

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.

@gastonmorixe
Copy link

+1 any update on this?

@sche
Copy link

sche commented Feb 11, 2016

+1

@Emailrus
Copy link

+1
Was very discouraged, when found out, that inheritance only applies to nuiClass and not selectors themself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants