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

Unable to use :extend on column classes #4

Closed
iansoper opened this issue Nov 25, 2014 · 2 comments
Closed

Unable to use :extend on column classes #4

iansoper opened this issue Nov 25, 2014 · 2 comments

Comments

@iansoper
Copy link

When I try to use less :extend function with column classes that are generated by gridiron (ex: .col-md-6), the extend is ignored and the column declaration in the css doesn't have the element I'm trying to extend it to.

Example Input

/* this class is created by gridrion */
.col-md-6 {
   width: 50%;
}

div {
   &:extend(.col-md-6 all)
}

/* Should output this: */

.col-md-6, div {
    width: 50%;
}

/* Instead it outputs this: */

.col-md-6 {

}
@kevinmartin
Copy link
Contributor

Hi @iansoper,

This seems to be a limitation in LESS (as explained in the references below). Try inverting it as explain here.

.col-md-6:extend(div) {}

The other solution is to compile GridIron first, rename the GridIron file(s) with a .less extension, then import those compiled GridIron files into your project. This is also explained in one of the references.

References:

@iansoper
Copy link
Author

Thanks @kevinmartin very helpful. I'll probably just precompile gridiron.

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

2 participants