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

Can't extend classes with + or - signs #4

Closed
trenkwill opened this issue Jan 13, 2015 · 4 comments
Closed

Can't extend classes with + or - signs #4

trenkwill opened this issue Jan 13, 2015 · 4 comments

Comments

@trenkwill
Copy link

Hi Harry,

Extending the regular class: @extend .pt; works
but when I try with @extend .pt+; I get this error:

"Error: Can't extend .pt +: can't extend nested selectors\A on line 1063 of webroot/styles/main.scss"

Any ideas ?
Thanks !

@csshugs
Copy link
Member

csshugs commented Jan 13, 2015

The + character is css syntax (sibling selector). Therefore you got to escape it with a backslash:

@extend .pt\+;

@trenkwill
Copy link
Author

That makes sense, thank you !

Le 13 janv. 2015 à 18:03, Dennis Heibuelt [email protected] a écrit :

The + character is css syntax (sibling selector). Therefore you got to escape it by:

@extend .pt+;

Reply to this email directly or view it on GitHub #4 (comment).

@kwyn
Copy link

kwyn commented Feb 9, 2015

This also breaks jade. I can use (class="pt+") but it's kind of obnoxious, for now just rolling with my own using the push--large and similar classes.

@nenadjelovac
Copy link
Member

@trenkwill

Extending the regular class: @extend .pt; works

Why would you ever extend it? Better use padding-top: $inuit-spacing-unit.

Also, know when to use extend, and try to avoid it as much as possible.

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

5 participants