question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Some widgets use hardcoded breakpoint names for their media queries

See original GitHub issue

This issue is similar to https://github.com/twbs/bootstrap/issues/20548, however in my case I want to change the breakpoint names as follows:

$grid-breakpoints: (
  xxs: 0,
  xs: 544px,
  sm: 768px,
  md: 992px,
  lg: 1200px
);

This seems to work as far as generating the columns. However, some of the Bootstrap scss files call the media-breakpoint-* mixin with a breakpoint name that no longer matches my breakpoint names. For example, _carousel.scss calls @include media-breakpoint-up(sm) which results in 768px in my case instead of 544px. I would have to manually change it to @include media-breakpoint-up(xs) for it to be correct with my breakpoint names.

Since the number of breakpoints are the same, perhaps some type of mapping can be used to map the mixin argument to the grid-breakpoint (e.g. @include media-breakpoint-up(sm) maps to xs: 544px in $grid-breakpoints).

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Andrew-Dyachenkocommented, Aug 27, 2017

@mdo @judowalker I found the source of the problem. The fact is that in the file /node_modules/bootstrap/scss/_tables.scss the function call comes with a hard binding to the argument, which we re-recorded when the file was customized /node_modules/bootstrap/scss/_variables.scss via /node_modules/bootstrap/scss/_custom.scss. All that is required to FIX it is to do a relative binding in the argument of the function, or simply change argument “In my case from md to m

_tables

I hope it will help to improve it

0reactions
Andrew-Dyachenkocommented, Aug 24, 2017

The same problemm: 2017-08-24 15-51-04 The code below working with bootstrap 4.0.0-alpha.6, but not working with bootstrap 4.0.0-beta 2017-08-24 15-59-08 The solution below not working with bootstrap 4.0.0-beta, but not checked in alpha 2017-08-24 16-00-11

Read more comments on GitHub >

github_iconTop Results From Across the Web

Breakpoint System Changes in Elementor v3.2.0
Prior to v3.2.0, each breakpoint was registered and utilized individually and in a hard-coded manner. They were called and used by name (...
Read more >
Breakpoints · Bootstrap v5.0
Breakpoints are the building blocks of responsive design. Use them to control when your layout can be adapted at a particular viewport or...
Read more >
Write Better Media Queries with Sass - David Walsh Blog
Sass includes a few helpful features that make media queries ... Media queries are hardcoded in the code and copied where they're needed....
Read more >
Redesigning the Media Query - 24 Ways
The media query is the ringmaster of responsive design. It lets us establish the rules of the game and gives us what we...
Read more >
How to get responsive Flutter layouts? - Stack Overflow
You can set some widget height or width based on a portion of the ... In responsive UI we don't use hard-coded values...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found