Skip to content

Commit f94bcbe

Browse files
committed
Fix instances of 2xl, fix utilities generation (#41774)
1 parent 8fd5f51 commit f94bcbe

File tree

16 files changed

+30
-30
lines changed

16 files changed

+30
-30
lines changed

scss/_navbar.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ $navbar-dark-brand-hover-color: $navbar-dark-active-color !default;
280280
}
281281

282282
.navbar-toggler {
283-
display: none;
283+
display: none !important; // stylelint-disable-line declaration-no-important
284284
}
285285

286286
.offcanvas {

scss/_utilities.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ $utilities: map.merge(
9595
print: true,
9696
property: display,
9797
class: d,
98-
important: true,
9998
values: inline inline-block block grid inline-grid table table-row table-cell flex inline-flex flow-root none
10099
),
101100
// scss-docs-end utils-display

scss/mixins/_utilities.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
}
3939

4040
// Calculate infix once, before the loop
41-
$infix: if($infix == "", "", "-" + $infix);
41+
// Note: $infix already includes the leading dash from breakpoint-infix()
42+
// $infix: if($infix == "", "", "-" + $infix);
4243

4344
@each $key, $value in $values {
4445
$properties: map.get($utility, property);

site/src/assets/examples/buttons/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const title = 'Buttons'
2626

2727
<div class="b-example-divider"></div>
2828

29-
<div class="col-lg-6 col-xxl-4 my-5 mx-auto">
29+
<div class="col-lg-6 col-2xl-4 my-5 mx-auto">
3030
<div class="d-grid gap-2">
3131
<button class="btn btn-outline-secondary" type="button">Secondary action</button>
3232
<button class="btn btn-primary" type="button">Primary action</button>

site/src/assets/examples/grid/index.astro

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ export const body_class = 'py-4'
4545
</div>
4646

4747
<div class="row mb-3 text-center">
48-
<div class="col-xxl-4 themed-grid-col">.col-xxl-4</div>
49-
<div class="col-xxl-4 themed-grid-col">.col-xxl-4</div>
50-
<div class="col-xxl-4 themed-grid-col">.col-xxl-4</div>
48+
<div class="col-2xl-4 themed-grid-col">.col-2xl-4</div>
49+
<div class="col-2xl-4 themed-grid-col">.col-2xl-4</div>
50+
<div class="col-2xl-4 themed-grid-col">.col-2xl-4</div>
5151
</div>
5252

5353
<h2 class="mt-4">Three equal columns</h2>
@@ -107,8 +107,8 @@ export const body_class = 'py-4'
107107
<hr class="my-4">
108108

109109
<h2 class="mt-4">Mixed: mobile and desktop</h2>
110-
<p>The Bootstrap v5 grid system has six tiers of classes: xs (extra small, this class infix is not used), sm (small), md (medium), lg (large), xl (x-large), and xxl (xx-large). You can use nearly any combination of these classes to create more dynamic and flexible layouts.</p>
111-
<p>Each tier of classes scales up, meaning if you plan on setting the same widths for md, lg, xl and xxl, you only need to specify md.</p>
110+
<p>The Bootstrap v5 grid system has six tiers of classes: xs (extra small, this class infix is not used), sm (small), md (medium), lg (large), xl (x-large), and 2xl (xx-large). You can use nearly any combination of these classes to create more dynamic and flexible layouts.</p>
111+
<p>Each tier of classes scales up, meaning if you plan on setting the same widths for md, lg, xl and 2xl, you only need to specify md.</p>
112112
<div class="row mb-3 text-center">
113113
<div class="col-md-8 themed-grid-col">.col-md-8</div>
114114
<div class="col-6 col-md-4 themed-grid-col">.col-6 .col-md-4</div>
@@ -172,14 +172,14 @@ export const body_class = 'py-4'
172172
<hr class="my-4">
173173

174174
<h2 class="mt-4">Containers</h2>
175-
<p>Additional classes added in Bootstrap v4.4 allow containers that are 100% wide until a particular breakpoint. v5 adds a new <code>xxl</code> breakpoint.</p>
175+
<p>Additional classes added in Bootstrap v4.4 allow containers that are 100% wide until a particular breakpoint. v5 adds a new <code>2xl</code> breakpoint.</p>
176176
</div>
177177

178178
<div class="container themed-container text-center">.container</div>
179179
<div class="container-sm themed-container text-center">.container-sm</div>
180180
<div class="container-md themed-container text-center">.container-md</div>
181181
<div class="container-lg themed-container text-center">.container-lg</div>
182182
<div class="container-xl themed-container text-center">.container-xl</div>
183-
<div class="container-xxl themed-container text-center">.container-xxl</div>
183+
<div class="container-2xl themed-container text-center">.container-2xl</div>
184184
<div class="container-fluid themed-container text-center">.container-fluid</div>
185185
</main>

site/src/assets/examples/heroes/index.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const extra_css = ['heroes.css']
4040

4141
<div class="b-example-divider"></div>
4242

43-
<div class="container col-xxl-8 px-4 py-5">
43+
<div class="container col-2xl-8 px-4 py-5">
4444
<div class="row flex-lg-row-reverse align-items-center g-5 py-5">
4545
<div class="col-10 col-sm-8 col-lg-6">
4646
<img src="bootstrap-themes.png" class="d-block mx-lg-auto img-fluid" alt="Bootstrap Themes" width="700" height="500" loading="lazy">
@@ -58,7 +58,7 @@ export const extra_css = ['heroes.css']
5858

5959
<div class="b-example-divider"></div>
6060

61-
<div class="container col-xl-10 col-xxl-8 px-4 py-5">
61+
<div class="container col-xl-10 col-2xl-8 px-4 py-5">
6262
<div class="row align-items-center g-lg-5 py-5">
6363
<div class="col-lg-7 text-center text-lg-start">
6464
<h1 class="display-4 fw-bold lh-1 text-body-emphasis mb-3">Vertically centered hero sign-up form</h1>

site/src/assets/examples/navbars/index.astro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,14 +199,14 @@ export const extra_css = ['navbars.css']
199199
</div>
200200
</nav>
201201

202-
<nav class="navbar navbar-expand-xxl navbar-dark bg-dark" aria-label="Seventh navbar example">
202+
<nav class="navbar navbar-expand-2xl navbar-dark bg-dark" aria-label="Seventh navbar example">
203203
<div class="container-fluid">
204-
<a class="navbar-brand" href="#">Expand at xxl</a>
205-
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarsExampleXxl" aria-controls="navbarsExampleXxl" aria-expanded="false" aria-label="Toggle navigation">
204+
<a class="navbar-brand" href="#">Expand at 2xl</a>
205+
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarsExample2xl" aria-controls="navbarsExample2xl" aria-expanded="false" aria-label="Toggle navigation">
206206
<span class="navbar-toggler-icon"></span>
207207
</button>
208208

209-
<div class="collapse navbar-collapse" id="navbarsExampleXxl">
209+
<div class="collapse navbar-collapse" id="navbarsExample2xl">
210210
<ul class="navbar-nav me-auto mb-2 mb-xl-0">
211211
<li class="nav-item">
212212
<a class="nav-link active" aria-current="page" href="#">Home</a>

site/src/components/header/Navigation.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const { addedIn, layout, title } = Astro.props
2222
---
2323

2424
<header class="navbar navbar-expand-lg bd-navbar sticky-top">
25-
<nav class="container-xxl bd-gutter flex-wrap flex-lg-nowrap" aria-label="Main navigation">
25+
<nav class="container-2xl bd-gutter flex-wrap flex-lg-nowrap" aria-label="Main navigation">
2626
{
2727
layout === 'docs' && (
2828
<div class="bd-navbar-toggle">

site/src/components/home/MastHead.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import ResponsiveImage from '@layouts/partials/ResponsiveImage.astro'
77
---
88

99
<div class="bd-masthead mb-3" id="content">
10-
<div class="container-xxl bd-gutter">
10+
<div class="container-2xl bd-gutter">
1111
<div class="col-md-8 mx-auto text-center">
1212
<a
1313
class="d-flex flex-column flex-lg-row justify-content-center align-items-center mb-4 text-dark lh-sm text-decoration-none"

site/src/content/docs/migration.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Bootstrap 6 is a major release with many breaking changes to modernize our codeb
6060
- **Updated lg, xl, and 2xl breakpoints and containers.**
6161
- Increased the `lg` breakpoint from 992px to 1024px; it's container remains the same at 960px.
6262
- Increased the `xl` breakpoint from 1200px to 1280px, and it's container from 1140px to 1200px.
63-
- Renamed `xxl` to `2xl` for better scaling with additional custom breakpoints
63+
- Renamed `2xl` to `2xl` for better scaling with additional custom breakpoints
6464
- Increased the `2xl` breakpoint from 1400px to 1536px, and it's container from 1320px to 1440px.
6565

6666
### Sass
@@ -74,7 +74,7 @@ Bootstrap 6 is a major release with many breaking changes to modernize our codeb
7474
- Removed `muted`, `black-50`, and `white-50` from text colors utilities map
7575
- Consolidated carousel dark variables, removing `$carousel-dark-indicator-active-bg`, `$carousel-dark-caption-color`, and `$carousel-dark-control-icon-filter` for their reassigned counterparts.
7676
- Removed `$btn-close-white-filter` for `$btn-close-filter-dark`.
77-
- Removed `$border-radius-2xl`, use `$border-radius-xxl`.
77+
- Removed `$border-radius-2xl`, use `$border-radius-2xl`.
7878
- Removed `$text-muted` for secondary color.
7979
- Removed `$hr-bg-color` for `$hr-border-color` and `$hr-height` for `$hr-border-width`.
8080
- Removed unused `$dropdown-header-padding` for the `-x`/`-y` split variables.

0 commit comments

Comments
 (0)