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

implicit mixin with pseudo class #1838

Closed
tlindig opened this issue Jan 29, 2014 · 1 comment
Closed

implicit mixin with pseudo class #1838

tlindig opened this issue Jan 29, 2014 · 1 comment

Comments

@tlindig
Copy link

tlindig commented Jan 29, 2014

I want include class properties of FontAwesome for a pseudo class to my-class.

.my-icon-caret-up:before { content: "\f0d8"; }

.my-class:before {
    .my-icon-caret-up:before;
}

But I got error:

Parse error: Unrecognised input
.my-class:before {        .my-icon-caret-up:before;    }

What have I to do to get it work?

I tried this on less2css.org with less 1.6.0 (current)

@seven-phases-max
Copy link
Member

.my-icon-caret-up:before can't be used as a mixin because of its :before part.
You can just write it like this (it's even shorter syntax after all):

.my-class:before {
    content: @fa-var-caret-up;
}

Or:

.my-class {
    &:before {content: @fa-var-caret-up}
}

Or you can go an alternative way you'll find there.

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

3 participants