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

use @grid-float-breakpoint-max #10465

Closed
wants to merge 5 commits into from
Closed

use @grid-float-breakpoint-max #10465

wants to merge 5 commits into from

Conversation

bassjobsen
Copy link
Contributor

fix for issue #10371 (and #10395)

@bpugh
Copy link

bpugh commented Sep 19, 2013

Just curious why this wasn't merged... is it not a valid issue?

@cvrebert
Copy link
Collaborator

@bpugh It hasn't yet been merged, but it will be (or a substantially similar fix will be applied).

@@ -248,7 +248,7 @@
@grid-gutter-width: 30px;
// Point at which the navbar stops collapsing
@grid-float-breakpoint: @screen-sm;

@grid-float-breakpoint-max: max(0,grid-float-breakpoint-1);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing a @ for grid-float-breakpoint ?
Also, there should be a space after the comma.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There isn't a "max" function listed at http://lesscss.org/#reference.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're adding one for v1.5 (https://github.com/less/less.js/blob/v1.5.0-b3/lib/less/functions.js#L311 ), but that's still in beta, and we're still stuck way back on v1.3.3 due to Recess.
So, this ain't gonna fly.

@@ -248,7 +248,16 @@
@grid-gutter-width: 30px;
// Point at which the navbar stops collapsing
@grid-float-breakpoint: @screen-sm;

//define @grid-float-breakpoint-max, always >= 0
.grid-float-breakpoint-max(@a)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe call it @width instead of @a ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this is more of a "clamped" than a "max".

@mdo
Copy link
Member

mdo commented Oct 14, 2013

This needs updating with master, the new variable added to the customizer, and then documented for it's own use somewhere as well.

Also, your formatting is a little off from the rest of the framework so that opening curly braces are on the same line as the rule and no extra spaces appear between nested parens.

@mdo
Copy link
Member

mdo commented Oct 14, 2013

Also bumping to 3.0.2 for now.

@cvrebert
Copy link
Collaborator

We should also update the .table-responsive media query; see #11086 (comment)

@bassjobsen
Copy link
Contributor Author

an other way to calculate max() in Less, see: http://stackoverflow.com/a/19386571/1596547:

.minmax(@a,@b,@unit:'px') {
  @min: ~"`Math.min(@{a},@{b})`@{unit}";
  @max: ~"`Math.max(@{a},@{b})`@{unit}";
}
.test {
  .minmax(700,800);
  width: @max;
}

@jamiebuilds
Copy link
Contributor

@cvrebert I can make the update to .table-responsive, I ran into the issue on my own and have made the change.

Update: check out the diff https://github.com/thejameskyle/bootstrap/compare/patch-1 (the compiled file will have the correct max-width once this PR is merged)

@mdo
Copy link
Member

mdo commented Nov 28, 2013

I still don't understand what you're trying to accomplish here. Compiling with grunt on this doesn't work—it errors out on your original assumption of setting the @grid-float-breakpoint var to 0.

Let's start fresh with a new PR and some more explanation around this.

@mdo mdo closed this Nov 28, 2013
mdo added a commit that referenced this pull request Dec 5, 2013
…havior across viewports and improve customization.

Also addresses #10371, #10395, and #10465.
stempler pushed a commit to stempler/bootstrap that referenced this pull request Apr 11, 2014
…k navbar behavior across viewports and improve customization.

Also addresses twbs#10371, twbs#10395, and twbs#10465.
stempler pushed a commit to stempler/bootstrap that referenced this pull request Nov 4, 2014
…k navbar behavior across viewports and improve customization.

Also addresses twbs#10371, twbs#10395, and twbs#10465.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants