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

Base-level rules cannot contain the parent-selector-referencing character '&'. #10301

Closed
devanflaherty opened this issue Jun 30, 2017 · 15 comments · Fixed by #10351
Closed

Base-level rules cannot contain the parent-selector-referencing character '&'. #10301

devanflaherty opened this issue Jun 30, 2017 · 15 comments · Fixed by #10351

Comments

@devanflaherty
Copy link

Just upgraded my rails project to use Foundation 6.4.
It was a new project I hadn't modified any code so replacing the settings.scss was easy and I was previously only selecting what components I wanted to load in.

I thought it would be seamless but I'm getting this :
Base-level rules cannot contain the parent-selector-referencing character '&'.

It's showing me this error for @include foundation-button-group;

I have foundation-sites installed via yarn, but I'm compiling the scss through rails asset pipeline.

Any help please, I'm dead in the water here.

@GenieTim
Copy link

Possible duplicate: Issue 10279

@IamManchanda
Copy link
Contributor

Yup duplicate but different code and this need to fix too

@kball
Copy link
Contributor

kball commented Jun 30, 2017

@IamManchanda can you find where in foundation-button-group might be triggering this? I'm not seeing anywhere in the code for button group where we have & outside of a selector

@kball
Copy link
Contributor

kball commented Jun 30, 2017

I just tested with ruby sass against develop and am not seeing errors in the main compile (including button group, as well as menu/xy where we were seeing some ruby sass problems before).

I am seeing an error with rubysass if I include the prototype classes:

Error: You may not @extend an outer selector from within @media.
       You may only @extend selectors within the same directive.
       From "@extend h1" on line 15 of scss/prototype/_typescale.scss.
        on line 105 of _vendor/normalize-scss/sass/normalize/_normalize-mixin.scss

@IamManchanda do you have time to look into that? If not I'll get it after some teaching but before I package up 6.4.1 today

@devanflaherty
Copy link
Author

devanflaherty commented Jun 30, 2017 via email

@IamManchanda
Copy link
Contributor

@kball @devanflaherty

I am seeing an error with rubysass if I include the prototype classes:

Oh Jesus, Seems like the problem is here
https://github.com/zurb/foundation-sites/blob/develop/scss/prototype/_typescale.scss#L9-L20

http://foundation.zurb.com/sites/docs/prototyping-utilities.html#typescale

@kball
Copy link
Contributor

kball commented Jun 30, 2017

@devanflaherty I've just published 6.4.1, which resolved the known issues associated with this outside of the opt-in prototyping helpers, so for a base install should "just work". Can you try it out and verify this is resolved for you?

@devanflaherty
Copy link
Author

devanflaherty commented Jul 2, 2017 via email

@Lunatig
Copy link

Lunatig commented Jul 4, 2017

@include foundation-prototype-typescale;

You may not @extend an outer selector from within @media.
You may only @extend selectors within the same directive.
From "@extend h1" on line 15 of node_modules/foundation-sites/scss/prototype/_typescale.scss

@kball
Copy link
Contributor

kball commented Jul 5, 2017

@IamManchanda any thoughts on resolving this prototyping scss issue?

@IamManchanda
Copy link
Contributor

@kball Can we just move typescale from prototyping helpers to typography part but still keep it disabled by default??

@kball
Copy link
Contributor

kball commented Jul 5, 2017

We can move it, but does that resolve the @extend/@media issue?

@IamManchanda
Copy link
Contributor

Yes if we move it here... this will most probably resolve the issue
See https://github.com/zurb/foundation-sites/blob/develop/scss/typography/_base.scss#L332

@kball
Copy link
Contributor

kball commented Jul 5, 2017

@IamManchanda lets try it - move it over and then test with ruby sass once you have (or if you prefer I can test it)

@IamManchanda
Copy link
Contributor

Yeah doing it now ... you test it as i dont use/know ruby(Me and my love of Php) ... so you test it ... doing a PR shortly 😉

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

Successfully merging a pull request may close this issue.

5 participants