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

有这样一个需求..... #2085

Closed
chinajoy opened this issue Jun 17, 2016 · 3 comments
Closed

有这样一个需求..... #2085

chinajoy opened this issue Jun 17, 2016 · 3 comments

Comments

@chinajoy
Copy link

先有这样一个scss
.a{
xxxx: xxxx;

.b{
      xxxx: xxxx;
      xxxx: xxxx;
      xxxx: xxxx;
  }

}

.c{
这里面我需要.b里面的样式;
}

我不希望在.b前面加@at-root
有解决方法嘛?

@douglasdeodato
Copy link

well if you at least translate this to English I will be able to help you.

@chinajoy
Copy link
Author

First there is such a SCSS
.a{
XXXX xxxx;
.b{
XXXX xxxx;
XXXX xxxx;
XXXX xxxx;
}
}
.c{
I need the style inside of.B;
}

I don't want to add @at-root to the front of the.B.
Is there a way to solve it?

@douglasdeodato

@xzyfer
Copy link

xzyfer commented Jun 17, 2016

The easiest way is to make the styles inside of B a mixin. Then include
that mixin in both B and C.
On 17 Jun 2016 8:18 PM, "混在成都" notifications@github.com wrote:

First there is such a SCSS
.a{
XXXX xxxx;
.b{
XXXX xxxx;
XXXX xxxx;
XXXX xxxx;
}
}
.c{
I need the style inside of.B;
}

I don't want to add @at-root https://github.com/at-root to the front of
the.B.
Is there a way to solve it?

@douglasdeodato https://github.com/douglasdeodato


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#2085 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AAjZWCBW4PTKK2IpYmhQoLzojaGD3BNZks5qMnRhgaJpZM4I4NuO
.

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