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

Allow mixins outputting selectors to be used at the stylesheet root #1527

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Allow mixins outputting selectors to be used at the stylesheet root #1527

wants to merge 1 commit into from

Conversation

JohnAlbin
Copy link
Contributor

I was converting a CSS ruleset of:

::selection {
  background: #ca322c;
  color: white;
}

to use Compass, when I saw that the Compass mixin required a * { } wrapper. With Sass 3.3's #{&} capability, it should be possible to use any mixin that outputs a selector at the root level of the stylesheet.

Currently, doing this at the root of a stylesheet produces an error, but it shouldn't:

@include selection(#ca322c, white);

@chriseppstein
Copy link
Member

Script parent didn't get into Sass 3.3. Instead, I've added a custom function at-stylesheet-root() which returns true when & used to return null. Can you rework this patch to use that instead?

See: 5fb0b88

@chriseppstein
Copy link
Member

@JohnAlbin Also, this needs tests :)

@chriseppstein chriseppstein added this to the 1.0.x milestone Mar 9, 2014
@chriseppstein
Copy link
Member

@JohnAlbin Sass 3.4 is being released today. want to dust this off for 1.1?

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

Successfully merging this pull request may close these issues.

None yet

2 participants