Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to refer to $container-max-widths in Bootstrap

I am currently working with Bootstrap 4 and I've made some changes to breakpoints - it looks like that:

$container-max-widths: (
    xs: 540px,
    sm: 700px,
    md: 960px,
    lg: 1140px,
    xl: 1300px,
    g: 1560px,
    xg: 1920px
) !default;

Here's my question: how can I refer to $container-max-widths -> g to get 1560px out of it?

I'd like to do something like this, but it's not working:

max-width: $grid-breakpoints('g');

Any ideas if that's possible?

like image 556
Michał Droździk Avatar asked Nov 24 '17 12:11

Michał Droździk


People also ask

What is the max-width of Bootstrap container?

$container-max-widths: ( sm: 540px, md: 720px, lg: 960px, xl: 1140px, xxl: 1320px );

What is container max-width?

A Container is a Div block with pre-defined styles. It comes with a 940-pixel max-width on larger displays that keeps your content centered relative to the browser window.


1 Answers

It's possible.

max-width: map-get($container-max-widths, "g");
like image 99
MrD Avatar answered Sep 21 '22 16:09

MrD