aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2021-09-13 22:02:37 -0600
committerGitHub <[email protected]>2021-09-13 22:02:37 -0600
commit70533dcdb84484af4320817a4a36b47ddf0e56f9 (patch)
treefc1b9f737f926af54b67eebfb75eb6a27b23b2cf
parentfde2544899f6728dea35591741662935d56b0362 (diff)
parentc9af4565fdc13eff025736e574ea10690fd21a39 (diff)
downloadbootstrap-70533dcdb84484af4320817a4a36b47ddf0e56f9.tar.xz
bootstrap-70533dcdb84484af4320817a4a36b47ddf0e56f9.zip
Merge branch 'main' into split-vars-maps-importsplit-vars-maps-import
-rw-r--r--js/tests/unit/collapse.spec.js5
-rw-r--r--scss/_tables.scss8
-rw-r--r--scss/mixins/_visually-hidden.scss2
-rw-r--r--site/content/docs/5.1/components/list-group.md12
-rw-r--r--site/content/docs/5.1/content/reboot.md2
-rw-r--r--site/content/docs/5.1/customize/optimize.md4
-rw-r--r--site/content/docs/5.1/forms/checks-radios.md10
-rw-r--r--site/content/docs/5.1/helpers/text-truncation.md4
8 files changed, 25 insertions, 22 deletions
diff --git a/js/tests/unit/collapse.spec.js b/js/tests/unit/collapse.spec.js
index ece88eff5..e37e37e55 100644
--- a/js/tests/unit/collapse.spec.js
+++ b/js/tests/unit/collapse.spec.js
@@ -2,7 +2,7 @@ import Collapse from '../../src/collapse'
import EventHandler from '../../src/dom/event-handler'
/** Test helpers */
-import { getFixture, clearFixture, jQueryMock } from '../helpers/fixture'
+import { clearFixture, getFixture, jQueryMock } from '../helpers/fixture'
describe('Collapse', () => {
let fixtureEl
@@ -294,14 +294,13 @@ describe('Collapse', () => {
' </div>'
].join('')
- // const btn = fixtureEl.querySelector('[data-bs-target="#collapseOne"]')
const el = fixtureEl.querySelector('#collapseOne')
const activeTabPane = fixtureEl.querySelector('#nav-home')
const collapse = new Collapse(el)
let times = 1
el.addEventListener('hidden.bs.collapse', () => {
- setTimeout(() => collapse.show(), 10)
+ collapse.show()
})
el.addEventListener('shown.bs.collapse', () => {
diff --git a/scss/_tables.scss b/scss/_tables.scss
index d474ad566..e10e4c4e4 100644
--- a/scss/_tables.scss
+++ b/scss/_tables.scss
@@ -39,8 +39,8 @@
}
// Highlight border color between thead, tbody and tfoot.
- > :not(:last-child) > :last-child > * {
- border-bottom-color: $table-group-separator-color;
+ > :not(:first-child) {
+ border-top: (2 * $table-border-width) solid $table-group-separator-color;
}
}
@@ -91,6 +91,10 @@
> :not(caption) > * > * {
border-bottom-width: 0;
}
+
+ > :not(:first-child) {
+ border-top-width: 0;
+ }
}
// Zebra-striping
diff --git a/scss/mixins/_visually-hidden.scss b/scss/mixins/_visually-hidden.scss
index ed7bc9c13..4fc7f49d6 100644
--- a/scss/mixins/_visually-hidden.scss
+++ b/scss/mixins/_visually-hidden.scss
@@ -3,7 +3,7 @@
// Hide content visually while keeping it accessible to assistive technologies
//
// See: https://www.a11yproject.com/posts/2013-01-11-how-to-hide-content/
-// See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/
+// See: https://kittygiraudel.com/2016/10/13/css-hide-and-seek/
@mixin visually-hidden() {
position: absolute !important;
diff --git a/site/content/docs/5.1/components/list-group.md b/site/content/docs/5.1/components/list-group.md
index c47a05dd3..71e45245c 100644
--- a/site/content/docs/5.1/components/list-group.md
+++ b/site/content/docs/5.1/components/list-group.md
@@ -102,9 +102,9 @@ Numbers are generated by `counter-reset` on the `<ol>`, and then styled and plac
{{< example >}}
<ol class="list-group list-group-numbered">
- <li class="list-group-item">Cras justo odio</li>
- <li class="list-group-item">Cras justo odio</li>
- <li class="list-group-item">Cras justo odio</li>
+ <li class="list-group-item">A list item</li>
+ <li class="list-group-item">A list item</li>
+ <li class="list-group-item">A list item</li>
</ol>
{{< /example >}}
@@ -115,21 +115,21 @@ These work great with custom content as well.
<li class="list-group-item d-flex justify-content-between align-items-start">
<div class="ms-2 me-auto">
<div class="fw-bold">Subheading</div>
- Cras justo odio
+ Content for list item
</div>
<span class="badge bg-primary rounded-pill">14</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-start">
<div class="ms-2 me-auto">
<div class="fw-bold">Subheading</div>
- Cras justo odio
+ Content for list item
</div>
<span class="badge bg-primary rounded-pill">14</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-start">
<div class="ms-2 me-auto">
<div class="fw-bold">Subheading</div>
- Cras justo odio
+ Content for list item
</div>
<span class="badge bg-primary rounded-pill">14</span>
</li>
diff --git a/site/content/docs/5.1/content/reboot.md b/site/content/docs/5.1/content/reboot.md
index f726a6635..63f892de2 100644
--- a/site/content/docs/5.1/content/reboot.md
+++ b/site/content/docs/5.1/content/reboot.md
@@ -433,7 +433,7 @@ The default `margin` on blockquotes is `1em 40px`, so we reset that to `0 0 1rem
The `<abbr>` element receives basic styling to make it stand out amongst paragraph text.
<div class="bd-example">
- Nulla <abbr title="attribute">attr</abbr> vitae elit libero, a pharetra augue.
+ The <abbr title="HyperText Markup Language">HTML</abbr> abbreviation element.
</div>
### Summary
diff --git a/site/content/docs/5.1/customize/optimize.md b/site/content/docs/5.1/customize/optimize.md
index 29b152154..fc61728ce 100644
--- a/site/content/docs/5.1/customize/optimize.md
+++ b/site/content/docs/5.1/customize/optimize.md
@@ -71,9 +71,9 @@ Lastly, this [CSS Tricks article on unused CSS](https://css-tricks.com/how-do-yo
Whenever possible, be sure to compress all the code you serve to your visitors. If you're using Bootstrap dist files, try to stick to the minified versions (indicated by the `.min.css` and `.min.js` extensions). If you're building Bootstrap from the source with your own build system, be sure to implement your own minifiers for HTML, CSS, and JS.
-## Nonblocking files
+## Non-blocking files
-While minifying and using compression might seem like enough, making your files nonblocking ones is also a big step in making your site well-optimized and fast enough.
+While minifying and using compression might seem like enough, making your files non-blocking ones is also a big step in making your site well-optimized and fast enough.
If you are using a [Lighthouse](https://developers.google.com/web/tools/lighthouse/) plugin in Google Chrome, you may have stumbled over FCP. [The First Contentful Paint](https://web.dev/fcp/) metric measures the time from when the page starts loading to when any part of the page's content is rendered on the screen.
diff --git a/site/content/docs/5.1/forms/checks-radios.md b/site/content/docs/5.1/forms/checks-radios.md
index 0f5507f54..efd040de0 100644
--- a/site/content/docs/5.1/forms/checks-radios.md
+++ b/site/content/docs/5.1/forms/checks-radios.md
@@ -102,23 +102,23 @@ Add the `disabled` attribute and the associated `<label>`s are automatically sty
## Switches
-A switch has the markup of a custom checkbox but uses the `.form-switch` class to render a toggle switch. Switches also support the `disabled` attribute.
+A switch has the markup of a custom checkbox but uses the `.form-switch` class to render a toggle switch. Consider using `role="switch"` to more accurately convey the nature of the control to assistive technologies that support this role. In older assistive technologies, it will simply be announced as a regular checkbox as a fallback. Switches also support the `disabled` attribute.
{{< example >}}
<div class="form-check form-switch">
- <input class="form-check-input" type="checkbox" id="flexSwitchCheckDefault">
+ <input class="form-check-input" type="checkbox" role="switch" id="flexSwitchCheckDefault">
<label class="form-check-label" for="flexSwitchCheckDefault">Default switch checkbox input</label>
</div>
<div class="form-check form-switch">
- <input class="form-check-input" type="checkbox" id="flexSwitchCheckChecked" checked>
+ <input class="form-check-input" type="checkbox" role="switch" id="flexSwitchCheckChecked" checked>
<label class="form-check-label" for="flexSwitchCheckChecked">Checked switch checkbox input</label>
</div>
<div class="form-check form-switch">
- <input class="form-check-input" type="checkbox" id="flexSwitchCheckDisabled" disabled>
+ <input class="form-check-input" type="checkbox" role="switch" id="flexSwitchCheckDisabled" disabled>
<label class="form-check-label" for="flexSwitchCheckDisabled">Disabled switch checkbox input</label>
</div>
<div class="form-check form-switch">
- <input class="form-check-input" type="checkbox" id="flexSwitchCheckCheckedDisabled" checked disabled>
+ <input class="form-check-input" type="checkbox" role="switch" id="flexSwitchCheckCheckedDisabled" checked disabled>
<label class="form-check-label" for="flexSwitchCheckCheckedDisabled">Disabled checked switch checkbox input</label>
</div>
{{< /example >}}
diff --git a/site/content/docs/5.1/helpers/text-truncation.md b/site/content/docs/5.1/helpers/text-truncation.md
index a92a171fd..799f2059b 100644
--- a/site/content/docs/5.1/helpers/text-truncation.md
+++ b/site/content/docs/5.1/helpers/text-truncation.md
@@ -12,12 +12,12 @@ For longer content, you can add a `.text-truncate` class to truncate the text wi
<!-- Block level -->
<div class="row">
<div class="col-2 text-truncate">
- Praeterea iter est quasdam res quas ex communi.
+ This text is quite long, and will be truncated once displayed.
</div>
</div>
<!-- Inline level -->
<span class="d-inline-block text-truncate" style="max-width: 150px;">
- Praeterea iter est quasdam res quas ex communi.
+ This text is quite long, and will be truncated once displayed.
</span>
{{< /example >}}