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

LESS Issue Extending Cols #14314

Closed
ci2014 opened this issue Aug 4, 2014 · 1 comment
Closed

LESS Issue Extending Cols #14314

ci2014 opened this issue Aug 4, 2014 · 1 comment
Labels

Comments

@ci2014
Copy link

ci2014 commented Aug 4, 2014

Hello everyone

I found out that the following code won't work in the LESS package of Bootstrap v3.2.0.

.main-col {
  &:extend(.col-md-16 all);

  border-right: 1px solid lighten(@gray, 33%);
  padding-right: 40px !important;
}

.sidebar-col {
  &:extend(.col-md-6 all);

  padding-left: 40px !important;
}

The classes are just not getting extended. There is no error message. I have tested it with less.js.

Any suggestions?

Thank you in advance.

@cvrebert cvrebert added the css label Aug 4, 2014
@cvrebert
Copy link
Collaborator

cvrebert commented Aug 4, 2014

You'll want to use the .make-md-col() mixin instead:

.make-md-column(@columns; @gutter: @grid-gutter-width) {

You can't :extend .col-md-6 etc. because of how those classes are dynamically generated. This may change in Bootstrap v4.
As for why Less doesn't produce any error, you'd have to ask the Less project folks about that.

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

No branches or pull requests

2 participants