Skip to content

Commit 4fecde4

Browse files
authored
v6: New lg, xl, and 2xl breakpoints, plus some renaming (#41770)
* Update xxl breakpoint and container, rename xxl to 2xl for better scaling Co-Authored-By: mdo <98681+mdo@users.noreply.github.com> * note for lg * bump bundlewatch --------- Co-authored-by: mdo <98681+mdo@users.noreply.github.com>
1 parent 5a54f29 commit 4fecde4

File tree

23 files changed

+105
-100
lines changed

23 files changed

+105
-100
lines changed

scss/_config.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ $grid-breakpoints: (
5252
xs: 0,
5353
sm: 576px,
5454
md: 768px,
55-
lg: 992px,
56-
xl: 1200px,
57-
xxl: 1400px
55+
lg: 1024px,
56+
xl: 1280px,
57+
2xl: 1536px
5858
) !default;
5959
// scss-docs-end grid-breakpoints
6060

@@ -80,8 +80,8 @@ $container-max-widths: (
8080
sm: 540px,
8181
md: 720px,
8282
lg: 960px,
83-
xl: 1140px,
84-
xxl: 1320px
83+
xl: 1200px,
84+
2xl: 1440px
8585
) !default;
8686
// scss-docs-end container-max-widths
8787

scss/_root.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
--#{$prefix}border-radius-sm: #{$border-radius-sm};
171171
--#{$prefix}border-radius-lg: #{$border-radius-lg};
172172
--#{$prefix}border-radius-xl: #{$border-radius-xl};
173-
--#{$prefix}border-radius-xxl: #{$border-radius-xxl};
173+
--#{$prefix}border-radius-2xl: #{$border-radius-2xl};
174174
--#{$prefix}border-radius-pill: #{$border-radius-pill};
175175
// scss-docs-end root-border-radius-var
176176

scss/_variables.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ $border-radius: .375rem !default;
214214
$border-radius-sm: .25rem !default;
215215
$border-radius-lg: .5rem !default;
216216
$border-radius-xl: 1rem !default;
217-
$border-radius-xxl: 2rem !default;
217+
$border-radius-2xl: 2rem !default;
218218
$border-radius-pill: 50rem !default;
219219
// scss-docs-end border-radius-variables
220220

@@ -519,7 +519,7 @@ $modal-footer-border-width: $modal-header-border-width !default;
519519
$modal-sm: 300px !default;
520520
$modal-md: 500px !default;
521521
$modal-lg: 800px !default;
522-
$modal-xl: 1140px !default;
522+
$modal-xl: 1200px !default;
523523

524524
$modal-fade-transform: translate(0, -50px) !default;
525525
$modal-show-transform: none !default;

scss/layout/_breakpoints.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
//
77
// Breakpoints are defined as a map of (name: minimum width), order from small to large:
88
//
9-
// (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px)
9+
// (xs: 0, sm: 576px, md: 768px, lg: 1024px, xl: 1280px, 2xl: 1536px)
1010
//
1111
// The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.
1212

1313
// Name of the next breakpoint, or null for the last breakpoint.
1414
//
1515
// >> breakpoint-next(sm)
1616
// md
17-
// >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
17+
// >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 1024px, xl: 1280px, 2xl: 1536px))
1818
// md
19-
// >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl xxl))
19+
// >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl 2xl))
2020
// md
2121
@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map.keys($breakpoints)) {
2222
$n: list.index($breakpoint-names, $name);
@@ -28,7 +28,7 @@
2828

2929
// Minimum breakpoint width. Null for the smallest (first) breakpoint.
3030
//
31-
// >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
31+
// >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 1024px, xl: 1280px, 2xl: 1536px))
3232
// 576px
3333
@function breakpoint-min($name, $breakpoints: $grid-breakpoints) {
3434
$min: map.get($breakpoints, $name);
@@ -42,7 +42,7 @@
4242
// Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.
4343
// See https://bugs.webkit.org/show_bug.cgi?id=178261
4444
//
45-
// >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
45+
// >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 1024px, xl: 1280px, 2xl: 1536px))
4646
// 767.98px
4747
@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {
4848
$max: map.get($breakpoints, $name);
@@ -52,9 +52,9 @@
5252
// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.
5353
// Useful for making responsive utilities.
5454
//
55-
// >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
55+
// >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 1024px, xl: 1280px, 2xl: 1536px))
5656
// "" (Returns a blank string)
57-
// >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
57+
// >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 1024px, xl: 1280px, 2xl: 1536px))
5858
// "-sm"
5959
@function breakpoint-infix($name, $breakpoints: $grid-breakpoints) {
6060
@return if(breakpoint-min($name, $breakpoints) == null, "", "-#{$name}");

site/data/breakpoints.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@
1919
- breakpoint: lg
2020
abbr: -lg
2121
name: Large
22-
min-width: 992px
22+
min-width: 1024px
2323
container: 960px
2424

2525
- breakpoint: xl
2626
abbr: -xl
2727
name: X-Large
28-
min-width: 1200px
29-
container: 1140px
28+
min-width: 1280px
29+
container: 1200px
3030

31-
- breakpoint: xxl
32-
abbr: -xxl
33-
name: XX-Large
34-
min-width: 1400px
35-
container: 1320px
31+
- breakpoint: 2xl
32+
abbr: -2xl
33+
name: 2X-Large
34+
min-width: 1536px
35+
container: 1440px

site/src/content/docs/components/dropdowns.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ Add `.dropdown-menu-end` to a `.dropdown-menu` to right align the dropdown menu.
645645

646646
If you want to use responsive alignment, disable dynamic positioning by adding the `data-bs-display="static"` attribute and use the responsive variation classes.
647647

648-
To align **right** the dropdown menu with the given breakpoint or larger, add `.dropdown-menu{-sm|-md|-lg|-xl|-xxl}-end`.
648+
To align **right** the dropdown menu with the given breakpoint or larger, add `.dropdown-menu{-sm|-md|-lg|-xl|-2xl}-end`.
649649

650650
<Example code={`<div class="btn-group">
651651
<button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" data-bs-display="static" aria-expanded="false">
@@ -658,7 +658,7 @@ To align **right** the dropdown menu with the given breakpoint or larger, add `.
658658
</ul>
659659
</div>`} />
660660

661-
To align **left** the dropdown menu with the given breakpoint or larger, add `.dropdown-menu-end` and `.dropdown-menu{-sm|-md|-lg|-xl|-xxl}-start`.
661+
To align **left** the dropdown menu with the given breakpoint or larger, add `.dropdown-menu-end` and `.dropdown-menu{-sm|-md|-lg|-xl|-2xl}-start`.
662662

663663
<Example code={`<div class="btn-group">
664664
<button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" data-bs-display="static" aria-expanded="false">

site/src/content/docs/components/list-group.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ These work great with custom content as well.
112112

113113
## Horizontal
114114

115-
Add `.list-group-horizontal` to change the layout of list group items from vertical to horizontal across all breakpoints. Alternatively, choose a responsive variant `.list-group-horizontal-{sm|md|lg|xl|xxl}` to make a list group horizontal starting at that breakpoint’s `min-width`. Currently **horizontal list groups cannot be combined with flush list groups.**
115+
Add `.list-group-horizontal` to change the layout of list group items from vertical to horizontal across all breakpoints. Alternatively, choose a responsive variant `.list-group-horizontal-{sm|md|lg|xl|2xl}` to make a list group horizontal starting at that breakpoint’s `min-width`. Currently **horizontal list groups cannot be combined with flush list groups.**
116116

117117
**ProTip:** Want equal-width list group items when horizontal? Add `.flex-fill` to each list group item.
118118

site/src/content/docs/components/modal.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ Modals have three optional sizes, available via modifier classes to be placed on
533533
| Small | `.modal-sm` | `300px` |
534534
| Default | <span class="text-body-secondary">None</span> | `500px` |
535535
| Large | `.modal-lg` | `800px` |
536-
| Extra large | `.modal-xl` | `1140px` |
536+
| Extra large | `.modal-xl` | `1200px` |
537537
</BsTable>
538538

539539
Our default modal without modifier class constitutes the “medium” size modal.
@@ -600,17 +600,17 @@ Another override is the option to pop up a modal that covers the user viewport,
600600
| `.modal-fullscreen` | Always |
601601
| `.modal-fullscreen-sm-down` | `576px` |
602602
| `.modal-fullscreen-md-down` | `768px` |
603-
| `.modal-fullscreen-lg-down` | `992px` |
604-
| `.modal-fullscreen-xl-down` | `1200px` |
605-
| `.modal-fullscreen-xxl-down` | `1400px` |
603+
| `.modal-fullscreen-lg-down` | `1024px` |
604+
| `.modal-fullscreen-xl-down` | `1280px` |
605+
| `.modal-fullscreen-2xl-down` | `1536px` |
606606
</BsTable>
607607

608608
<Example showMarkup={false} code={`<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalFullscreen">Full screen</button>
609609
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalFullscreenSm">Full screen below sm</button>
610610
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalFullscreenMd">Full screen below md</button>
611611
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalFullscreenLg">Full screen below lg</button>
612612
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalFullscreenXl">Full screen below xl</button>
613-
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalFullscreenXxl">Full screen below xxl</button>`} />
613+
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalFullscreen2xl">Full screen below 2xl</button>`} />
614614

615615
```html
616616
<!-- Full screen modal -->
@@ -704,11 +704,11 @@ Another override is the option to pop up a modal that covers the user viewport,
704704
</div>
705705
</div>
706706

707-
<div class="modal fade" id="exampleModalFullscreenXxl" tabindex="-1" aria-labelledby="exampleModalFullscreenXxlLabel" aria-hidden="true">
708-
<div class="modal-dialog modal-fullscreen-xxl-down">
707+
<div class="modal fade" id="exampleModalFullscreen2xl" tabindex="-1" aria-labelledby="exampleModalFullscreen2xlLabel" aria-hidden="true">
708+
<div class="modal-dialog modal-fullscreen-2xl-down">
709709
<div class="modal-content">
710710
<div class="modal-header">
711-
<h1 class="modal-title fs-4" id="exampleModalFullscreenXxlLabel">Full screen below xxl</h1>
711+
<h1 class="modal-title fs-4" id="exampleModalFullscreen2xlLabel">Full screen below 2xl</h1>
712712
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
713713
</div>
714714
<div class="modal-body">

site/src/content/docs/components/navbar.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { getConfig } from '@libs/config'
1010

1111
Here’s what you need to know before getting started with the navbar:
1212

13-
- Navbars require a wrapping `.navbar` with `.navbar-expand{-sm|-md|-lg|-xl|-xxl}` for responsive collapsing and [color scheme](#color-schemes) classes.
13+
- Navbars require a wrapping `.navbar` with `.navbar-expand{-sm|-md|-lg|-xl|-2xl}` for responsive collapsing and [color scheme](#color-schemes) classes.
1414
- Navbars and their contents are fluid by default. Change the [container](#containers) to limit their horizontal width in different ways.
1515
- Use our [spacing]([[docsref:/utilities/spacing]]) and [flex]([[docsref:/utilities/flex]]) utility classes for controlling spacing and alignment within navbars.
1616
- Navbars are responsive by default, but you can easily modify them to change that. Responsive behavior depends on our Collapse JavaScript plugin.
@@ -499,7 +499,7 @@ Here’s an example navbar using `.navbar-nav-scroll` with `style="--bs-scroll-h
499499

500500
## Responsive behaviors
501501

502-
Navbars can use `.navbar-toggler`, `.navbar-collapse`, and `.navbar-expand{-sm|-md|-lg|-xl|-xxl}` classes to determine when their content collapses behind a button. In combination with other utilities, you can easily choose when to show or hide particular elements.
502+
Navbars can use `.navbar-toggler`, `.navbar-collapse`, and `.navbar-expand{-sm|-md|-lg|-xl|-2xl}` classes to determine when their content collapses behind a button. In combination with other utilities, you can easily choose when to show or hide particular elements.
503503

504504
For navbars that never collapse, add the `.navbar-expand` class on the navbar. For navbars that always collapse, don’t add any `.navbar-expand` class.
505505

site/src/content/docs/components/offcanvas.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Responsive offcanvas classes hide content outside the viewport from a specified
146146
- `.offcanvas-md`
147147
- `.offcanvas-lg`
148148
- `.offcanvas-xl`
149-
- `.offcanvas-xxl`
149+
- `.offcanvas-2xl`
150150

151151
To make a responsive offcanvas, replace the `.offcanvas` base class with a responsive variant and ensure your close button has an explicit `data-bs-target`.
152152

0 commit comments

Comments
 (0)