Compare commits
75 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 129115f7e1 | |||
| faab259d50 | |||
| ec96eacd0e | |||
| 7002738865 | |||
| cacbdc680e | |||
| f9b32bc3de | |||
| f7b15cdaff | |||
| 76449ba3e3 | |||
| cbbb567b63 | |||
| f58c9c505a | |||
| c2a7d686de | |||
| 394b161faa | |||
| 186bda9062 | |||
| 833be9fe7d | |||
| 9708bcced8 | |||
| fa3ad0bfd3 | |||
| 30e0152567 | |||
| 5c2f2e7e0e | |||
| 5796e152a4 | |||
| 88bb06b8cc | |||
| 1862645095 | |||
| a6f4299797 | |||
| 798df99400 | |||
| 15c1324d9e | |||
| fee9dc2438 | |||
| 2f7184e125 | |||
| f73113c4a7 | |||
| 653f8f3cb3 | |||
| d07536f7f6 | |||
| 2fab352a6c | |||
| f32ae30297 | |||
| 8885dc2a77 | |||
| 9270d1c51a | |||
| 5ee90fe3d7 | |||
| 9b638d7146 | |||
| c57190fa31 | |||
| 7b0a123646 | |||
| 05079f5ec9 | |||
| 2c79a97128 | |||
| 5a417eb2de | |||
| cb8db371d4 | |||
| a7a45b25a6 | |||
| 9b00689715 | |||
| 523493d096 | |||
| fecd219983 | |||
| dcec1df61f | |||
| 429e0c3b9d | |||
| 6f87fce796 | |||
| 329acbdec6 | |||
| e1b48d253c | |||
| 3390260883 | |||
| 24b9ce532f | |||
| a6b02a5f08 | |||
| 8e7cceddea | |||
| e3e00b5002 | |||
| de1852b3d0 | |||
| dba63ed962 | |||
| f8c0663249 | |||
| 048f56f514 | |||
| 9fb1ec3b14 | |||
| 56519aca6e | |||
| 9b846e435c | |||
| 7a42c40ba0 | |||
| 1307d47c8d | |||
| a3ee5353fe | |||
| ab9f0ba68a | |||
| 3083596e87 | |||
| 4e954ea332 | |||
| 8c10ee828f | |||
| ac831aa4df | |||
| 163f1f732c | |||
| 8b19264893 | |||
| c05cd9a47a | |||
| 6ca9152d04 | |||
| c6d1d54043 |
@@ -1,12 +1,20 @@
|
||||
{
|
||||
"files": [
|
||||
{
|
||||
"path": "./dist/css/bootstrap-debugger.css",
|
||||
"maxSize": "0.75 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap-debugger.min.css",
|
||||
"maxSize": "0.75 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap-grid.css",
|
||||
"maxSize": "6.5 kB"
|
||||
"maxSize": "7.0 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap-grid.min.css",
|
||||
"maxSize": "6.0 kB"
|
||||
"maxSize": "6.25 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap-reboot.css",
|
||||
|
||||
@@ -221,7 +221,7 @@ includes code changes) and under the terms of the
|
||||
|
||||
[Adhere to the Code Guide.](https://codeguide.co/#css)
|
||||
|
||||
- When feasible, default color palettes should comply with [WCAG color contrast guidelines](https://www.w3.org/TR/WCAG20/#visual-audio-contrast).
|
||||
- When feasible, default color palettes should comply with [WCAG color contrast guidelines](https://www.w3.org/TR/WCAG/#distinguishable).
|
||||
- Except in rare cases, don't remove default `:focus` styles (via e.g. `outline: none;`) without providing alternative styles. See [this A11Y Project post](https://www.a11yproject.com/posts/2013-01-25-never-remove-css-outlines/) for more details.
|
||||
|
||||
### JS
|
||||
|
||||
@@ -21,3 +21,8 @@ updates:
|
||||
timezone: Europe/Athens
|
||||
versioning-strategy: increase
|
||||
rebase-strategy: disabled
|
||||
groups:
|
||||
production-dependencies:
|
||||
dependency-type: "production"
|
||||
development-dependencies:
|
||||
dependency-type: "development"
|
||||
|
||||
@@ -83,6 +83,14 @@ Within the download you'll find the following directories and files, logically g
|
||||
```text
|
||||
bootstrap/
|
||||
├── css/
|
||||
│ ├── bootstrap-debugger.css
|
||||
│ ├── bootstrap-debugger.css.map
|
||||
│ ├── bootstrap-debugger.min.css
|
||||
│ ├── bootstrap-debugger.min.css.map
|
||||
│ ├── bootstrap-debugger.rtl.css
|
||||
│ ├── bootstrap-debugger.rtl.css.map
|
||||
│ ├── bootstrap-debugger.rtl.min.css
|
||||
│ ├── bootstrap-debugger.rtl.min.css.map
|
||||
│ ├── bootstrap-grid.css
|
||||
│ ├── bootstrap-grid.css.map
|
||||
│ ├── bootstrap-grid.min.css
|
||||
|
||||
@@ -56,7 +56,7 @@ const Manipulator = {
|
||||
|
||||
for (const key of bsKeys) {
|
||||
let pureKey = key.replace(/^bs/, '')
|
||||
pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length)
|
||||
pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1)
|
||||
attributes[pureKey] = normalizeData(element.dataset[key])
|
||||
}
|
||||
|
||||
|
||||
@@ -160,7 +160,6 @@ class Tooltip extends BaseComponent {
|
||||
return
|
||||
}
|
||||
|
||||
this._activeTrigger.click = !this._activeTrigger.click
|
||||
if (this._isShown()) {
|
||||
this._leave()
|
||||
return
|
||||
|
||||
@@ -56,6 +56,26 @@ describe('Popover', () => {
|
||||
})
|
||||
|
||||
describe('show', () => {
|
||||
it('should toggle a popover after show', () => {
|
||||
return new Promise(resolve => {
|
||||
fixtureEl.innerHTML = '<a href="#" title="Popover" data-bs-content="https://twitter.com/getbootstrap">BS twitter</a>'
|
||||
|
||||
const popoverEl = fixtureEl.querySelector('a')
|
||||
const popover = new Popover(popoverEl)
|
||||
|
||||
popoverEl.addEventListener('shown.bs.popover', () => {
|
||||
expect(document.querySelector('.popover')).not.toBeNull()
|
||||
popover.toggle()
|
||||
})
|
||||
popoverEl.addEventListener('hidden.bs.popover', () => {
|
||||
expect(document.querySelector('.popover')).toBeNull()
|
||||
resolve()
|
||||
})
|
||||
|
||||
popover.show()
|
||||
})
|
||||
})
|
||||
|
||||
it('should show a popover', () => {
|
||||
return new Promise(resolve => {
|
||||
fixtureEl.innerHTML = '<a href="#" title="Popover" data-bs-content="https://twitter.com/getbootstrap">BS twitter</a>'
|
||||
|
||||
@@ -167,6 +167,34 @@
|
||||
<input type="email" readonly class="form-control-plaintext" id="floatingPlaintextInput1" placeholder="name@example.com" value="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum mattis mi at lobortis rutrum. Phasellus varius a risus non lobortis. Ut id congue enim. Quisque facilisis elit ac elit dapibus aliquet nec sit amet arcu. Morbi vitae ultricies eros. Proin varius augue in tristique pretium. Morbi at ullamcorper elit, at ullamcorper massa. Vivamus suscipit quam quis viverra eleifend.">
|
||||
<label for="floatingPlaintextInput1">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum mattis mi at lobortis rutrum. Phasellus varius a risus non lobortis. Ut id congue enim. Quisque facilisis elit ac elit dapibus aliquet nec sit amet arcu. Morbi vitae ultricies eros. Proin varius augue in tristique pretium. Morbi at ullamcorper elit, at ullamcorper massa. Vivamus suscipit quam quis viverra eleifend.</label>
|
||||
</div>
|
||||
<!--Compare form-select rendering depending on the size-->
|
||||
<div class="form-floating">
|
||||
<select class="form-select" id="floatingSelectRegular" aria-label="Floating label select example">
|
||||
<option selected="">Open this select menu</option>
|
||||
<option value="1">One</option>
|
||||
<option value="2">Two</option>
|
||||
<option value="3">Three</option>
|
||||
</select>
|
||||
<label for="floatingSelectRegular">Works with selects</label>
|
||||
</div>
|
||||
<div class="form-floating">
|
||||
<select class="form-select form-select-sm" id="floatingSelectSmall" aria-label="Floating label select example">
|
||||
<option selected="">Open this select menu</option>
|
||||
<option value="1">One</option>
|
||||
<option value="2">Two</option>
|
||||
<option value="3">Three</option>
|
||||
</select>
|
||||
<label for="floatingSelectSmall">Works with selects</label>
|
||||
</div>
|
||||
<div class="form-floating">
|
||||
<select class="form-select form-select-lg" id="floatingSelectLarge" aria-label="Floating label select example">
|
||||
<option selected="">Open this select menu</option>
|
||||
<option value="1">One</option>
|
||||
<option value="2">Two</option>
|
||||
<option value="3">Three</option>
|
||||
</select>
|
||||
<label for="floatingSelectLarge">Works with selects</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid bg-body" data-bs-theme="dark">
|
||||
@@ -329,6 +357,34 @@
|
||||
<input type="email" readonly class="form-control-plaintext" id="floatingPlaintextInput3" placeholder="name@example.com" value="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum mattis mi at lobortis rutrum. Phasellus varius a risus non lobortis. Ut id congue enim. Quisque facilisis elit ac elit dapibus aliquet nec sit amet arcu. Morbi vitae ultricies eros. Proin varius augue in tristique pretium. Morbi at ullamcorper elit, at ullamcorper massa. Vivamus suscipit quam quis viverra eleifend.">
|
||||
<label for="floatingPlaintextInput3">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum mattis mi at lobortis rutrum. Phasellus varius a risus non lobortis. Ut id congue enim. Quisque facilisis elit ac elit dapibus aliquet nec sit amet arcu. Morbi vitae ultricies eros. Proin varius augue in tristique pretium. Morbi at ullamcorper elit, at ullamcorper massa. Vivamus suscipit quam quis viverra eleifend.</label>
|
||||
</div>
|
||||
<!--Compare form-select rendering depending on the size-->
|
||||
<div class="form-floating">
|
||||
<select class="form-select" id="floatingSelectRegularDark" aria-label="Floating label select example">
|
||||
<option selected="">Open this select menu</option>
|
||||
<option value="1">One</option>
|
||||
<option value="2">Two</option>
|
||||
<option value="3">Three</option>
|
||||
</select>
|
||||
<label for="floatingSelectRegularDark">Works with selects</label>
|
||||
</div>
|
||||
<div class="form-floating">
|
||||
<select class="form-select form-select-sm" id="floatingSelectSmallDark" aria-label="Floating label select example">
|
||||
<option selected="">Open this select menu</option>
|
||||
<option value="1">One</option>
|
||||
<option value="2">Two</option>
|
||||
<option value="3">Three</option>
|
||||
</select>
|
||||
<label for="floatingSelectSmallDark">Works with selects</label>
|
||||
</div>
|
||||
<div class="form-floating">
|
||||
<select class="form-select form-select-lg" id="floatingSelectLargeDark" aria-label="Floating label select example">
|
||||
<option selected="">Open this select menu</option>
|
||||
<option value="1">One</option>
|
||||
<option value="2">Two</option>
|
||||
<option value="3">Three</option>
|
||||
</select>
|
||||
<label for="floatingSelectLargeDark">Works with selects</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Generated
+2185
-1659
File diff suppressed because it is too large
Load Diff
+28
-28
@@ -82,7 +82,7 @@
|
||||
"docs-serve": "hugo server --port 9001 --disableFastRender --noHTTPCache --renderToMemory --printPathWarnings --printUnusedTemplates",
|
||||
"docs-serve-only": "npx sirv-cli _site --port 9001",
|
||||
"lockfile-lint": "lockfile-lint --allowed-hosts npm --allowed-schemes https: --empty-hostname false --type npm --path package-lock.json",
|
||||
"update-deps": "ncu -u -x eslint,karma-browserstack-launcher,karma-rollup-preprocessor",
|
||||
"update-deps": "ncu -u -x eslint,eslint-config-xo,karma-browserstack-launcher,karma-rollup-preprocessor,sass",
|
||||
"release": "npm-run-all dist release-sri docs-build release-zip*",
|
||||
"release-sri": "node build/generate-sri.mjs",
|
||||
"release-version": "node build/change-version.mjs",
|
||||
@@ -103,35 +103,35 @@
|
||||
"@popperjs/core": "^2.11.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.24.8",
|
||||
"@babel/core": "^7.24.9",
|
||||
"@babel/preset-env": "^7.24.8",
|
||||
"@docsearch/js": "^3.6.1",
|
||||
"@babel/cli": "^7.25.9",
|
||||
"@babel/core": "^7.26.0",
|
||||
"@babel/preset-env": "^7.26.0",
|
||||
"@docsearch/js": "^3.7.0",
|
||||
"@popperjs/core": "^2.11.8",
|
||||
"@rollup/plugin-babel": "^6.0.4",
|
||||
"@rollup/plugin-commonjs": "^26.0.1",
|
||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||
"@rollup/plugin-replace": "^5.0.7",
|
||||
"@rollup/plugin-commonjs": "^28.0.1",
|
||||
"@rollup/plugin-node-resolve": "^15.3.0",
|
||||
"@rollup/plugin-replace": "^6.0.1",
|
||||
"@stackblitz/sdk": "^1.11.0",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"bundlewatch": "^0.3.3",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"bundlewatch": "^0.4.0",
|
||||
"clean-css-cli": "^5.6.3",
|
||||
"clipboard": "^2.0.11",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-xo": "^0.45.0",
|
||||
"eslint-plugin-html": "^8.1.1",
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
"eslint-plugin-html": "^8.1.2",
|
||||
"eslint-plugin-import": "^2.31.0",
|
||||
"eslint-plugin-markdown": "^5.1.0",
|
||||
"eslint-plugin-unicorn": "^54.0.0",
|
||||
"eslint-plugin-unicorn": "^55.0.0",
|
||||
"find-unused-sass-variables": "^6.0.0",
|
||||
"globby": "^14.0.2",
|
||||
"hammer-simulator": "0.0.1",
|
||||
"hugo-bin": "^0.126.0",
|
||||
"hugo-bin": "^0.134.1",
|
||||
"ip": "^2.0.1",
|
||||
"jasmine": "^5.2.0",
|
||||
"jasmine": "^5.3.0",
|
||||
"jquery": "^3.7.1",
|
||||
"karma": "^6.4.3",
|
||||
"karma": "^6.4.4",
|
||||
"karma-browserstack-launcher": "1.4.0",
|
||||
"karma-chrome-launcher": "^3.2.0",
|
||||
"karma-coverage-istanbul-reporter": "^3.0.3",
|
||||
@@ -141,20 +141,20 @@
|
||||
"karma-jasmine-html-reporter": "^2.1.0",
|
||||
"karma-rollup-preprocessor": "7.0.7",
|
||||
"lockfile-lint": "^4.14.0",
|
||||
"nodemon": "^3.1.4",
|
||||
"npm-run-all2": "^6.2.2",
|
||||
"postcss": "^8.4.39",
|
||||
"nodemon": "^3.1.7",
|
||||
"npm-run-all2": "^7.0.1",
|
||||
"postcss": "^8.4.47",
|
||||
"postcss-cli": "^11.0.0",
|
||||
"rollup": "^4.19.0",
|
||||
"rollup": "^4.24.4",
|
||||
"rollup-plugin-istanbul": "^5.0.0",
|
||||
"rtlcss": "^4.1.1",
|
||||
"sass": "^1.77.8",
|
||||
"sass-true": "^8.0.0",
|
||||
"rtlcss": "^4.3.0",
|
||||
"sass": "1.78.0",
|
||||
"sass-true": "^8.1.0",
|
||||
"shelljs": "^0.8.5",
|
||||
"stylelint": "^16.7.0",
|
||||
"stylelint-config-twbs-bootstrap": "^14.2.0",
|
||||
"terser": "^5.31.3",
|
||||
"vnu-jar": "23.4.11"
|
||||
"stylelint": "^16.10.0",
|
||||
"stylelint-config-twbs-bootstrap": "^15.1.0",
|
||||
"terser": "^5.36.0",
|
||||
"vnu-jar": "24.10.17"
|
||||
},
|
||||
"files": [
|
||||
"dist/{css,js}/*.{css,js,map}",
|
||||
|
||||
+1
-2
@@ -193,8 +193,7 @@
|
||||
// The child selector allows nested `.card` within `.card-group`
|
||||
// to display properly.
|
||||
> .card {
|
||||
// Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
|
||||
flex: 1 0 0%;
|
||||
flex: 1 0 0;
|
||||
margin-bottom: 0;
|
||||
|
||||
+ .card {
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
@if $enable-debugger-classes {
|
||||
%grid-debug {
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1999;
|
||||
pointer-events: none;
|
||||
content: "";
|
||||
background: repeating-linear-gradient(to right, transparent, transparent calc(var(--#{$prefix}gutter-x) * .5), var(--#{$prefix}primary) calc(var(--#{$prefix}gutter-x) * .5), var(--#{$prefix}primary) calc((100% - 12 * var(--#{$prefix}gutter-x)) / 12 + var(--#{$prefix}gutter-x) * .5), transparent calc((100% - 12 * var(--#{$prefix}gutter-x)) / 12 + var(--#{$prefix}gutter-x) * .5), transparent calc(100% / 12)); // stylelint-disable-line function-disallowed-list
|
||||
opacity: .3;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$prefix}debug-grids {
|
||||
&::before {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 2000;
|
||||
padding: .5em 1em;
|
||||
font-family: $font-family-base;
|
||||
color: $black;
|
||||
background-color: $white;
|
||||
border-radius: 0 0 4px; // stylelint-disable-line property-disallowed-list
|
||||
@include font-size(var(--#{$prefix}debug-label-font-size, $h1-font-size));
|
||||
}
|
||||
|
||||
@each $breakpoint, $value in $grid-breakpoints {
|
||||
@include media-breakpoint-up($breakpoint) {
|
||||
&::before {
|
||||
content: "#{$breakpoint}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[class^="container"],
|
||||
&[class^="container"],
|
||||
.row,
|
||||
&.row {
|
||||
@extend %grid-debug;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$prefix}debug-grid-cols {
|
||||
@extend %grid-debug;
|
||||
}
|
||||
}
|
||||
@@ -177,7 +177,7 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
|
||||
@return if($l1 > $l2, divide($l1 + .05, $l2 + .05), divide($l2 + .05, $l1 + .05));
|
||||
}
|
||||
|
||||
// Return WCAG2.1 relative luminance
|
||||
// Return WCAG2.2 relative luminance
|
||||
// See https://www.w3.org/TR/WCAG/#dfn-relative-luminance
|
||||
// See https://www.w3.org/TR/WCAG/#dfn-contrast-ratio
|
||||
@function luminance($color) {
|
||||
|
||||
+1
-1
@@ -169,8 +169,8 @@
|
||||
.nav-justified {
|
||||
> .nav-link,
|
||||
.nav-item {
|
||||
flex-basis: 0;
|
||||
flex-grow: 1;
|
||||
flex-basis: 0;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -139,8 +139,8 @@
|
||||
// the default flexbox row orientation. Requires the use of `flex-wrap: wrap`
|
||||
// on the `.navbar` parent.
|
||||
.navbar-collapse {
|
||||
flex-basis: 100%;
|
||||
flex-grow: 1;
|
||||
flex-basis: 100%;
|
||||
// For always expanded or extra full navbars, ensure content aligns itself
|
||||
// properly vertically. Can be easily overridden with flex utilities.
|
||||
align-items: center;
|
||||
|
||||
@@ -67,8 +67,8 @@ $colors: (
|
||||
) !default;
|
||||
// scss-docs-end colors-map
|
||||
|
||||
// The contrast ratio to reach against white, to determine if color changes from "light" to "dark". Acceptable values for WCAG 2.0 are 3, 4.5 and 7.
|
||||
// See https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast
|
||||
// The contrast ratio to reach against white, to determine if color changes from "light" to "dark". Acceptable values for WCAG 2.2 are 3, 4.5 and 7.
|
||||
// See https://www.w3.org/TR/WCAG/#contrast-minimum
|
||||
$min-contrast-ratio: 4.5 !default;
|
||||
|
||||
// Customize the light and dark text colors for use in our color contrast function.
|
||||
@@ -383,6 +383,7 @@ $enable-validation-icons: true !default;
|
||||
$enable-negative-margins: false !default;
|
||||
$enable-deprecation-messages: true !default;
|
||||
$enable-important-utilities: true !default;
|
||||
$enable-debugger-classes: true !default;
|
||||
|
||||
$enable-dark-mode: true !default;
|
||||
$color-mode-type: data !default; // `data` or `media-query`
|
||||
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
$enable-debugger-classes: true !default;
|
||||
|
||||
@import "functions";
|
||||
@import "variables";
|
||||
@import "mixins";
|
||||
|
||||
@import "debug";
|
||||
Vendored
+1
@@ -58,5 +58,6 @@ $utilities: map-get-multiple(
|
||||
"padding-start",
|
||||
)
|
||||
);
|
||||
@import "debug";
|
||||
|
||||
@import "utilities/api";
|
||||
|
||||
Vendored
+1
@@ -46,6 +46,7 @@
|
||||
|
||||
// Helpers
|
||||
@import "helpers";
|
||||
@import "debug";
|
||||
|
||||
// Utilities
|
||||
@import "utilities/api";
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
> .form-select {
|
||||
padding-top: $form-floating-input-padding-t;
|
||||
padding-bottom: $form-floating-input-padding-b;
|
||||
padding-left: $form-floating-padding-x;
|
||||
}
|
||||
|
||||
> .form-control:focus,
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
@include media-breakpoint-up($breakpoint, $breakpoints) {
|
||||
// Provide basic `.col-{bp}` classes for equal-width flexbox columns
|
||||
.col#{$infix} {
|
||||
flex: 1 0 0%; // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
|
||||
flex: 1 0 0;
|
||||
}
|
||||
|
||||
.row-cols#{$infix}-auto > * {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// Use to only display content when it's focused, or one of its child elements is focused
|
||||
// (i.e. when focus is within the element/container that the class was applied to)
|
||||
//
|
||||
// Useful for "Skip to main content" links; see https://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
|
||||
// Useful for "Skip to main content" links; see https://www.w3.org/WAI/WCAG22/Techniques/general/G1.html
|
||||
|
||||
@mixin visually-hidden-focusable() {
|
||||
&:not(:focus):not(:focus-within) {
|
||||
|
||||
@@ -20,13 +20,10 @@ export default () => {
|
||||
|
||||
const btnHtml = [
|
||||
'<div class="bd-code-snippet">',
|
||||
' <div class="d-flex align-items-center highlight-toolbar ps-3 pe-2 py-1">',
|
||||
' <small class="font-monospace text-body-secondary text-uppercase">html</small>',
|
||||
' <div class="d-flex ms-auto">',
|
||||
' <button type="button" class="btn-clipboard mt-0 me-0">',
|
||||
' <svg class="bi" aria-hidden="true"><use xlink:href="#clipboard"></use></svg>',
|
||||
' </button>',
|
||||
' </div>',
|
||||
' <div class="bd-clipboard">',
|
||||
' <button type="button" class="btn-clipboard">',
|
||||
' <svg class="bi" role="img" aria-label="Copy"><use xlink:href="#clipboard"/></svg>',
|
||||
' </button>',
|
||||
' </div>',
|
||||
'</div>'
|
||||
].join('')
|
||||
@@ -38,7 +35,6 @@ export default () => {
|
||||
if (!element.closest('.bd-example-snippet')) {
|
||||
element.insertAdjacentHTML('beforebegin', btnHtml)
|
||||
element.previousElementSibling.append(element)
|
||||
element.previousElementSibling.querySelector('small').textContent = element.querySelector('pre > code').getAttribute('data-lang')
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
padding: .5em;
|
||||
line-height: 1;
|
||||
color: var(--bs-body-color);
|
||||
background-color: transparent;
|
||||
background-color: var(--bd-pre-bg);
|
||||
border: 0;
|
||||
@include border-radius(.25rem);
|
||||
|
||||
|
||||
@@ -12,18 +12,6 @@
|
||||
margin-left: 0;
|
||||
border-width: 1px;
|
||||
@include border-radius(var(--bs-border-radius));
|
||||
|
||||
> :first-child {
|
||||
@include border-top-radius(calc(var(--bs-border-radius) - 1px));
|
||||
}
|
||||
|
||||
> :last-child {
|
||||
@include border-bottom-radius(calc(var(--bs-border-radius) - 1px));
|
||||
}
|
||||
}
|
||||
|
||||
> :not(:first-child) {
|
||||
border-top: 1px solid var(--bs-border-color);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,10 +31,7 @@
|
||||
margin-right: 0;
|
||||
margin-left: 0;
|
||||
border-width: 1px;
|
||||
|
||||
&:not(:first-child) {
|
||||
@include border-radius(var(--bs-border-radius));
|
||||
}
|
||||
@include border-radius(var(--bs-border-radius));
|
||||
}
|
||||
|
||||
+ p {
|
||||
@@ -368,6 +353,7 @@
|
||||
|
||||
@include media-breakpoint-up(md) {
|
||||
padding: .75rem 1.25rem;
|
||||
@include border-radius(calc(var(--bs-border-radius) - 1px));
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(lg) {
|
||||
@@ -399,6 +385,18 @@
|
||||
|
||||
.highlight-toolbar {
|
||||
background-color: var(--bd-pre-bg);
|
||||
|
||||
+ .highlight {
|
||||
@include border-top-radius(0);
|
||||
}
|
||||
}
|
||||
|
||||
.bd-file-ref {
|
||||
.highlight-toolbar {
|
||||
@include media-breakpoint-up(md) {
|
||||
@include border-top-radius(calc(var(--bs-border-radius) - 1px));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bd-content .bd-code-snippet {
|
||||
|
||||
@@ -21,37 +21,19 @@
|
||||
}
|
||||
|
||||
.bd-code-snippet {
|
||||
--bs-border-radius: .5rem;
|
||||
|
||||
position: relative;
|
||||
margin: 0;
|
||||
border-color: var(--bs-border-color-translucent);
|
||||
border-width: 1px;
|
||||
@include border-radius(.5rem);
|
||||
}
|
||||
|
||||
.highlight-toolbar {
|
||||
padding: 0 !important; // stylelint-disable-line declaration-no-important
|
||||
|
||||
> :first-child {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.btn-clipboard {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: .75rem;
|
||||
z-index: 1;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
.highlight-toolbar + .highlight {
|
||||
.highlight {
|
||||
width: 100%;
|
||||
padding: .5rem 1rem;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
background-color: rgba(var(--bs-body-color-rgb), .075);
|
||||
border: 0;
|
||||
@include border-radius(calc(.5rem - 1px));
|
||||
|
||||
@include media-breakpoint-up(lg) {
|
||||
@@ -64,7 +46,6 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-clipboard {
|
||||
position: absolute;
|
||||
top: -.625rem;
|
||||
@@ -105,7 +86,7 @@
|
||||
padding: 1rem;
|
||||
color: rgba(var(--bg-rgb), 1);
|
||||
background-color: rgba(var(--bg-rgb), .1);
|
||||
background-blend-mode: multiple;
|
||||
background-blend-mode: multiply;
|
||||
@include border-radius(1rem);
|
||||
mix-blend-mode: darken;
|
||||
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
background-color: transparent;
|
||||
box-shadow: 0 .5rem 1rem rgba($black, .15), inset 0 -1px 0 rgba($white, .15);
|
||||
|
||||
@media (forced-colors) {
|
||||
background-color: Canvas;
|
||||
}
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
layout: docs
|
||||
title: About
|
||||
title: About Bootstrap
|
||||
description: Learn more about the team maintaining Bootstrap, how and why the project started, and how to get involved.
|
||||
group: about
|
||||
aliases:
|
||||
|
||||
@@ -10,7 +10,7 @@ Community members have translated Bootstrap's documentation into various languag
|
||||
{{< translations.inline >}}
|
||||
<ul>
|
||||
{{ range .Site.Data.translations -}}
|
||||
<li><a href="{{ .url }}" hreflang="{{ .code }}">{{ .description }} ({{ .name }})</a></li>
|
||||
<li><a href="{{ .url }}" hreflang="{{ .code }}" lang="{{ .code }}">{{ .description }} ({{ .name }})</a></li>
|
||||
{{ end -}}
|
||||
</ul>
|
||||
{{< /translations.inline >}}
|
||||
|
||||
@@ -165,7 +165,7 @@ You can make your carousels autoplay on page load by setting the `ride` option t
|
||||
{{< callout info >}}
|
||||
For accessibility reasons, we recommend avoiding the use of autoplaying carousels. If your page does include an autoplaying carousel, we recommend providing an additional button or control to explicitly pause/stop the carousel.
|
||||
|
||||
See [WCAG 2.1 Success Criterion 2.2.2 Pause, Stop, Hide](https://www.w3.org/TR/WCAG21/#pause-stop-hide).
|
||||
See [WCAG 2.2 Success Criterion 2.2.2 Pause, Stop, Hide](https://www.w3.org/TR/WCAG/#pause-stop-hide).
|
||||
{{< /callout >}}
|
||||
|
||||
{{< example >}}
|
||||
|
||||
@@ -8,7 +8,7 @@ toc: true
|
||||
|
||||
## Overview
|
||||
|
||||
Dropdowns are toggleable, contextual overlays for displaying lists of links and more. They're made interactive with the included Bootstrap dropdown JavaScript plugin. They're toggled by clicking, not by hovering; this is [an intentional design decision](https://markdotto.com/2012/02/27/bootstrap-explained-dropdowns/).
|
||||
Dropdowns are toggleable, contextual overlays for displaying lists of links and more. They're made interactive with the included Bootstrap dropdown JavaScript plugin. They're toggled by clicking, not by hovering; this is [an intentional design decision](https://markdotto.com/blog/bootstrap-explained-dropdowns/).
|
||||
|
||||
Dropdowns are built on a third party library, [Popper](https://popper.js.org/docs/v2/), which provides dynamic positioning and viewport detection. Be sure to include [popper.min.js]({{< param "cdn.popper" >}}) before Bootstrap's JavaScript or use `bootstrap.bundle.min.js` / `bootstrap.bundle.js` which contains Popper. Popper isn't used to position dropdowns in navbars though as dynamic positioning isn't required.
|
||||
|
||||
@@ -126,7 +126,7 @@ The best part is you can do this with any button variant, too:
|
||||
<!-- Example single danger button -->
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-danger dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Action
|
||||
Danger
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="#">Action</a></li>
|
||||
@@ -228,7 +228,7 @@ We use this extra class to reduce the horizontal `padding` on either side of the
|
||||
```html
|
||||
<!-- Example split danger button -->
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-danger">Action</button>
|
||||
<button type="button" class="btn btn-danger">Danger</button>
|
||||
<button type="button" class="btn btn-danger dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="visually-hidden">Toggle Dropdown</span>
|
||||
</button>
|
||||
|
||||
@@ -201,7 +201,7 @@ When modals become too long for the user's viewport or device, they scroll indep
|
||||
<h1 class="modal-title fs-5" id="exampleModalLongTitle">Modal title</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body" style="min-height: 1500px">
|
||||
<div class="modal-body" style="min-height: 100vh">
|
||||
<p>This is some placeholder content to show the scrolling behavior for modals. Instead of repeating the text in the modal, we use an inline style to set a minimum height, thereby extending the length of the overall modal and demonstrating the overflow scrolling. When content becomes longer than the height of the viewport, scrolling will move the modal as needed.</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
@@ -111,7 +111,7 @@ And with custom HTML added:
|
||||
With an SVG:
|
||||
|
||||
<div class="bd-example tooltip-demo">
|
||||
<a href="#" class="d-inline-block" data-bs-toggle="tooltip" data-bs-title="Default tooltip">
|
||||
<a href="#" class="d-inline-block" data-bs-toggle="tooltip" data-bs-title="Default tooltip" aria-label="Hover or focus to see default tooltip">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 100 100">
|
||||
<rect width="100%" height="100%" fill="#563d7c"/>
|
||||
<circle cx="50" cy="50" r="30" fill="#007bff"/>
|
||||
|
||||
@@ -20,10 +20,12 @@ You can find and customize these variables for key global options in Bootstrap's
|
||||
| `$enable-transitions` | `true` (default) or `false` | Enables predefined `transition`s on various components. |
|
||||
| `$enable-reduced-motion` | `true` (default) or `false` | Enables the [`prefers-reduced-motion` media query]({{< docsref "/getting-started/accessibility#reduced-motion" >}}), which suppresses certain animations/transitions based on the users' browser/operating system preferences. |
|
||||
| `$enable-grid-classes` | `true` (default) or `false` | Enables the generation of CSS classes for the grid system (e.g. `.row`, `.col-md-1`, etc.). |
|
||||
| `$enable-cssgrid` | `true` or `false` (default) | Enables the experimental CSS Grid system (e.g. `.grid`, `.g-col-md-1`, etc.). |
|
||||
| `$enable-container-classes` | `true` (default) or `false` | Enables the generation of CSS classes for layout containers. (New in v5.2.0) |
|
||||
| `$enable-caret` | `true` (default) or `false` | Enables pseudo element caret on `.dropdown-toggle`. |
|
||||
| `$enable-button-pointers` | `true` (default) or `false` | Add "hand" cursor to non-disabled button elements. |
|
||||
| `$enable-rfs` | `true` (default) or `false` | Globally enables [RFS]({{< docsref "/getting-started/rfs" >}}). |
|
||||
| `$enable-debugger-classes` | `true` or `false` (default) | Enables the use of `.bs-grid-debug` class. You can use it on any html element and it will highlight its children grids (`.row` and `.container-*`). It also displays the living breakpoint depending on the viewport. |
|
||||
| `$enable-validation-icons` | `true` (default) or `false` | Enables `background-image` icons within textual inputs and some custom forms for validation states. |
|
||||
| `$enable-negative-margins` | `true` or `false` (default) | Enables the generation of [negative margin utilities]({{< docsref "/utilities/spacing#negative-margin" >}}). |
|
||||
| `$enable-deprecation-messages` | `true` (default) or `false` | Set to `false` to hide warnings when using any of the deprecated mixins and functions that are planned to be removed in `v6`. |
|
||||
|
||||
@@ -31,40 +31,20 @@ sitemap:
|
||||
|
||||
## Code example
|
||||
|
||||
<div class="bd-example">
|
||||
<div class="test">This is a test using <code>.bd-example</code> directly.</div>
|
||||
</div>
|
||||
|
||||
```scss
|
||||
.test {
|
||||
--color: blue;
|
||||
}
|
||||
```
|
||||
|
||||
```html
|
||||
<div class="test">This is a triple backtick markup only test.</div>
|
||||
```
|
||||
|
||||
{{< highlight html >}}
|
||||
<div class="test">This is a highlight tag markup only test.</div>
|
||||
{{< /highlight >}}
|
||||
|
||||
{{< example show_preview=false >}}
|
||||
<div class="test">This is a markup only test.</div>
|
||||
{{< /example >}}
|
||||
|
||||
{{< example show_markup=false >}}
|
||||
<div class="test">This is a preview only test.</div>
|
||||
{{< /example >}}
|
||||
<div class="bd-example">
|
||||
The <abbr title="HyperText Markup Language">HTML</abbr> abbreviation element.
|
||||
</div>
|
||||
|
||||
{{< example >}}
|
||||
<div class="test">This is a test.</div>
|
||||
{{< /example >}}
|
||||
|
||||
{{< example class=bg-body-secondary >}}
|
||||
<div class="test">This is a test with a custom background color.</div>
|
||||
{{< /example >}}
|
||||
|
||||
{{< scss-docs name="variable-gradient" file="scss/_variables.scss" >}}
|
||||
|
||||
{{< js-docs name="live-toast" file="site/assets/js/partials/snippets.js" >}}
|
||||
|
||||
@@ -40,11 +40,11 @@ body_class: ""
|
||||
<div class="d-flex gap-2 justify-content-center py-5">
|
||||
<button class="btn btn-primary d-inline-flex align-items-center" type="button">
|
||||
Primary icon
|
||||
<svg class="bi ms-1" width="20" height="20"><use xlink:href="#arrow-right-short"/></svg>
|
||||
<svg class="bi ms-1" width="20" height="20" aria-hidden="true"><use xlink:href="#arrow-right-short"/></svg>
|
||||
</button>
|
||||
<button class="btn btn-outline-secondary d-inline-flex align-items-center" type="button">
|
||||
Secondary icon
|
||||
<svg class="bi ms-1" width="20" height="20"><use xlink:href="#arrow-right-short"/></svg>
|
||||
<svg class="bi ms-1" width="20" height="20" aria-hidden="true"><use xlink:href="#arrow-right-short"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -921,7 +921,7 @@ direction: rtl
|
||||
|
||||
<div>
|
||||
{{< example show_markup="false" >}}
|
||||
<div class="btn-group w-100 align-items-center justify-content-between flex-wrap">
|
||||
<div class="btn-group w-100 align-items-center justify-content-between flex-wrap me-0">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-secondary btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
زر القائمة المنسدلة
|
||||
@@ -1034,7 +1034,7 @@ direction: rtl
|
||||
{{< /example >}}
|
||||
|
||||
{{< example show_markup="false" >}}
|
||||
<div class="btn-group w-100 align-items-center justify-content-between flex-wrap">
|
||||
<div class="btn-group w-100 align-items-center justify-content-between flex-wrap me-0">
|
||||
<div class="dropend">
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
زر القائمة المنسدلة لليسار
|
||||
|
||||
@@ -920,7 +920,7 @@ body_class: "bg-body-tertiary"
|
||||
|
||||
<div>
|
||||
{{< example show_markup="false" >}}
|
||||
<div class="btn-group w-100 align-items-center justify-content-between flex-wrap">
|
||||
<div class="btn-group w-100 align-items-center justify-content-between flex-wrap me-0">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-secondary btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Dropdown button
|
||||
@@ -1033,7 +1033,7 @@ body_class: "bg-body-tertiary"
|
||||
{{< /example >}}
|
||||
|
||||
{{< example show_markup="false" >}}
|
||||
<div class="btn-group w-100 align-items-center justify-content-between flex-wrap">
|
||||
<div class="btn-group w-100 align-items-center justify-content-between flex-wrap me-0">
|
||||
<div class="dropend">
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Dropend button
|
||||
|
||||
@@ -227,7 +227,7 @@ body_class: ""
|
||||
<option value="December">December</option>
|
||||
</select>
|
||||
<button class="btn cal-btn" type="button" aria-label="next month">
|
||||
<svg class="bi" width="16" height="16"><use xlink:href="#arrow-right-short"/></svg>
|
||||
<svg class="bi" width="16" height="16" aria-hidden="true"><use xlink:href="#arrow-right-short"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="cal-weekdays text-body-secondary">
|
||||
@@ -306,7 +306,7 @@ body_class: ""
|
||||
<option value="December">December</option>
|
||||
</select>
|
||||
<button class="btn cal-btn" type="button" aria-label="next month">
|
||||
<svg class="bi" width="16" height="16"><use xlink:href="#arrow-right-short"/></svg>
|
||||
<svg class="bi" width="16" height="16" aria-hidden="true"><use xlink:href="#arrow-right-short"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="cal-weekdays text-body-secondary">
|
||||
|
||||
@@ -30,7 +30,7 @@ body_class: ""
|
||||
<div class="d-inline-flex gap-2 mb-5">
|
||||
<button class="d-inline-flex align-items-center btn btn-primary btn-lg px-4 rounded-pill" type="button">
|
||||
Call to action
|
||||
<svg class="bi ms-2" width="24" height="24"><use xlink:href="#arrow-right-short"/></svg>
|
||||
<svg class="bi ms-2" width="24" height="24" aria-hidden="true"><use xlink:href="#arrow-right-short"/></svg>
|
||||
</button>
|
||||
<button class="btn btn-outline-secondary btn-lg px-4 rounded-pill" type="button">
|
||||
Secondary link
|
||||
|
||||
@@ -38,25 +38,25 @@ title: Starter Template
|
||||
<ul class="list-unstyled ps-0">
|
||||
<li>
|
||||
<a class="icon-link mb-1" href="https://github.com/twbs/examples/tree/main/icons-font" rel="noopener" target="_blank">
|
||||
<svg class="bi" width="16" height="16"><use xlink:href="#arrow-right-circle"/></svg>
|
||||
<svg class="bi" width="16" height="16" aria-hidden="true"><use xlink:href="#arrow-right-circle"/></svg>
|
||||
Bootstrap npm starter
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="icon-link mb-1" href="https://github.com/twbs/examples/tree/main/parcel" rel="noopener" target="_blank">
|
||||
<svg class="bi" width="16" height="16"><use xlink:href="#arrow-right-circle"/></svg>
|
||||
<svg class="bi" width="16" height="16" aria-hidden="true"><use xlink:href="#arrow-right-circle"/></svg>
|
||||
Bootstrap Parcel starter
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="icon-link mb-1" href="https://github.com/twbs/examples/tree/main/vite" rel="noopener" target="_blank">
|
||||
<svg class="bi" width="16" height="16"><use xlink:href="#arrow-right-circle"/></svg>
|
||||
<svg class="bi" width="16" height="16" aria-hidden="true"><use xlink:href="#arrow-right-circle"/></svg>
|
||||
Bootstrap Vite starter
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="icon-link mb-1" href="https://github.com/twbs/examples/tree/main/webpack" rel="noopener" target="_blank">
|
||||
<svg class="bi" width="16" height="16"><use xlink:href="#arrow-right-circle"/></svg>
|
||||
<svg class="bi" width="16" height="16" aria-hidden="true"><use xlink:href="#arrow-right-circle"/></svg>
|
||||
Bootstrap Webpack starter
|
||||
</a>
|
||||
</li>
|
||||
@@ -69,31 +69,31 @@ title: Starter Template
|
||||
<ul class="list-unstyled ps-0">
|
||||
<li>
|
||||
<a class="icon-link mb-1" href="{{< docsref "/getting-started/introduction" >}}">
|
||||
<svg class="bi" width="16" height="16"><use xlink:href="#arrow-right-circle"/></svg>
|
||||
<svg class="bi" width="16" height="16" aria-hidden="true"><use xlink:href="#arrow-right-circle"/></svg>
|
||||
Bootstrap quick start guide
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="icon-link mb-1" href="{{< docsref "/getting-started/webpack" >}}">
|
||||
<svg class="bi" width="16" height="16"><use xlink:href="#arrow-right-circle"/></svg>
|
||||
<svg class="bi" width="16" height="16" aria-hidden="true"><use xlink:href="#arrow-right-circle"/></svg>
|
||||
Bootstrap Webpack guide
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="icon-link mb-1" href="{{< docsref "/getting-started/parcel" >}}">
|
||||
<svg class="bi" width="16" height="16"><use xlink:href="#arrow-right-circle"/></svg>
|
||||
<svg class="bi" width="16" height="16" aria-hidden="true"><use xlink:href="#arrow-right-circle"/></svg>
|
||||
Bootstrap Parcel guide
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="icon-link mb-1" href="{{< docsref "/getting-started/vite" >}}">
|
||||
<svg class="bi" width="16" height="16"><use xlink:href="#arrow-right-circle"/></svg>
|
||||
<svg class="bi" width="16" height="16" aria-hidden="true"><use xlink:href="#arrow-right-circle"/></svg>
|
||||
Bootstrap Vite guide
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="icon-link mb-1" href="{{< docsref "/getting-started/contribute" >}}">
|
||||
<svg class="bi" width="16" height="16"><use xlink:href="#arrow-right-circle"/></svg>
|
||||
<svg class="bi" width="16" height="16" aria-hidden="true"><use xlink:href="#arrow-right-circle"/></svg>
|
||||
Contributing to Bootstrap
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -10,7 +10,7 @@ Bootstrap provides an easy-to-use framework of ready-made styles, layout tools,
|
||||
|
||||
## Overview and limitations
|
||||
|
||||
The overall accessibility of any project built with Bootstrap depends in large part on the author's markup, additional styling, and scripting they've included. However, provided that these have been implemented correctly, it should be perfectly possible to create websites and applications with Bootstrap that fulfill [<abbr title="Web Content Accessibility Guidelines">WCAG</abbr> 2.1](https://www.w3.org/TR/WCAG/) (A/AA/AAA), [Section 508](https://www.section508.gov/), and similar accessibility standards and requirements.
|
||||
The overall accessibility of any project built with Bootstrap depends in large part on the author's markup, additional styling, and scripting they've included. However, provided that these have been implemented correctly, it should be perfectly possible to create websites and applications with Bootstrap that fulfill [<abbr title="Web Content Accessibility Guidelines">WCAG</abbr> 2.2](https://www.w3.org/TR/WCAG/) (A/AA/AAA), [Section 508](https://www.section508.gov/), and similar accessibility standards and requirements.
|
||||
|
||||
### Structural markup
|
||||
|
||||
@@ -24,7 +24,7 @@ Because Bootstrap's components are purposely designed to be fairly generic, auth
|
||||
|
||||
### Color contrast
|
||||
|
||||
Some combinations of colors that currently make up Bootstrap's default palette—used throughout the framework for things such as button variations, alert variations, form validation indicators—may lead to *insufficient* color contrast (below the recommended [WCAG 2.1 text color contrast ratio of 4.5:1](https://www.w3.org/TR/WCAG/#contrast-minimum) and the [WCAG 2.1 non-text color contrast ratio of 3:1](https://www.w3.org/TR/WCAG/#non-text-contrast)), particularly when used against a light background. Authors are encouraged to test their specific uses of color and, where necessary, manually modify/extend these default colors to ensure adequate color contrast ratios.
|
||||
Some combinations of colors that currently make up Bootstrap's default palette—used throughout the framework for things such as button variations, alert variations, form validation indicators—may lead to *insufficient* color contrast (below the recommended [WCAG 2.2 text color contrast ratio of 4.5:1](https://www.w3.org/TR/WCAG/#contrast-minimum) and the [WCAG 2.2 non-text color contrast ratio of 3:1](https://www.w3.org/TR/WCAG/#non-text-contrast)), particularly when used against a light background. Authors are encouraged to test their specific uses of color and, where necessary, manually modify/extend these default colors to ensure adequate color contrast ratios.
|
||||
|
||||
### Visually hidden content
|
||||
|
||||
@@ -51,7 +51,7 @@ On browsers that support `prefers-reduced-motion`, and where the user has *not*
|
||||
|
||||
## Additional resources
|
||||
|
||||
- [Web Content Accessibility Guidelines (WCAG) 2.1](https://www.w3.org/TR/WCAG/)
|
||||
- [Web Content Accessibility Guidelines (WCAG) 2.2](https://www.w3.org/TR/WCAG/)
|
||||
- [The A11Y Project](https://www.a11yproject.com/)
|
||||
- [MDN accessibility documentation](https://developer.mozilla.org/en-US/docs/Web/Accessibility)
|
||||
- [Tenon.io Accessibility Checker](https://tenon.io/)
|
||||
|
||||
@@ -15,6 +15,14 @@ Once downloaded, unzip the compressed folder and you'll see something like this:
|
||||
```text
|
||||
bootstrap/
|
||||
├── css/
|
||||
│ ├── bootstrap-debugger.css
|
||||
│ ├── bootstrap-debugger.css.map
|
||||
│ ├── bootstrap-debugger.min.css
|
||||
│ ├── bootstrap-debugger.min.css.map
|
||||
│ ├── bootstrap-debugger.rtl.css
|
||||
│ ├── bootstrap-debugger.rtl.css.map
|
||||
│ ├── bootstrap-debugger.rtl.min.css
|
||||
│ ├── bootstrap-debugger.rtl.min.css.map
|
||||
│ ├── bootstrap-grid.css
|
||||
│ ├── bootstrap-grid.css.map
|
||||
│ ├── bootstrap-grid.min.css
|
||||
@@ -72,6 +80,7 @@ Bootstrap includes a handful of options for including some or all of our compile
|
||||
| CSS files | Layout | Content | Components | Utilities |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| `bootstrap.css`<br> `bootstrap.min.css`<br> `bootstrap.rtl.css`<br> `bootstrap.rtl.min.css` | Included | Included | Included | Included |
|
||||
| `bootstrap-debugger.css`<br> `bootstrap-debugger.rtl.css`<br> `bootstrap-debugger.min.css`<br> `bootstrap-debugger.rtl.min.css` | [Only debug classes]({{< docsref "/customize/options" >}}) | — | — | — |
|
||||
| `bootstrap-grid.css`<br> `bootstrap-grid.rtl.css`<br> `bootstrap-grid.min.css`<br> `bootstrap-grid.rtl.min.css` | [Only grid system]({{< docsref "/layout/grid" >}}) | — | — | [Only flex utilities]({{< docsref "/utilities/flex" >}}) |
|
||||
| `bootstrap-utilities.css`<br> `bootstrap-utilities.rtl.css`<br> `bootstrap-utilities.min.css`<br> `bootstrap-utilities.rtl.min.css` | — | — | — | Included |
|
||||
| `bootstrap-reboot.css`<br> `bootstrap-reboot.rtl.css`<br> `bootstrap-reboot.min.css`<br> `bootstrap-reboot.rtl.min.css` | — | [Only Reboot]({{< docsref "/content/reboot" >}}) | — | — |
|
||||
|
||||
@@ -100,6 +100,17 @@ Install Bootstrap in your Node.js powered apps with [the yarn package](https://y
|
||||
yarn add bootstrap@{{< param "current_version" >}}
|
||||
```
|
||||
|
||||
{{< callout warning >}}
|
||||
**Yarn 2+ (aka Yarn Berry) doesn't support the `node_modules` directory by default**: using our [Sass & JS example](https://github.com/twbs/examples/tree/main/sass-js) needs some adjustments:
|
||||
|
||||
```sh
|
||||
yarn config set nodeLinker node-modules # Use the node_modules linker
|
||||
touch yarn.lock # Create an empty yarn.lock file
|
||||
yarn install # Install the dependencies
|
||||
yarn start # Start the project
|
||||
```
|
||||
{{< /callout >}}
|
||||
|
||||
### RubyGems
|
||||
|
||||
Install Bootstrap in your Ruby apps using [Bundler](https://bundler.io/) (**recommended**) and [RubyGems](https://rubygems.org/) by adding the following line to your [`Gemfile`](https://bundler.io/guides/gemfile.html):
|
||||
|
||||
@@ -24,7 +24,7 @@ A better alternative for those using this type of frameworks is to use a framewo
|
||||
{{< /callout >}}
|
||||
- Vue: [BootstrapVue](https://bootstrap-vue.org/) (Bootstrap 4)
|
||||
- Vue 3: [BootstrapVueNext](https://bootstrap-vue-next.github.io/bootstrap-vue-next/) (Bootstrap 5, currently in alpha)
|
||||
- Angular: [ng-bootstrap](https://ng-bootstrap.github.io/)
|
||||
- Angular: [ng-bootstrap](https://ng-bootstrap.github.io/) or [ngx-bootstrap](https://valor-software.com/ngx-bootstrap)
|
||||
|
||||
## Using Bootstrap as a module
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ added:
|
||||
Stacks offer a shortcut for applying a number of flexbox properties to quickly and easily create layouts in Bootstrap. All credit for the concept and implementation goes to the open source [Pylon project](https://almonk.github.io/pylon/).
|
||||
|
||||
{{< callout warning >}}
|
||||
**Heads up!** Support for gap utilities with flexbox was recently added to Safari, so consider verifying your intended browser support. Grid layout should have no issues. [Read more](https://caniuse.com/flexbox-gap).
|
||||
**Heads up!** Support for gap utilities with flexbox isn't available in Safari prior to 14.5, so consider verifying your intended browser support. Grid layout should have no issues. [Read more](https://caniuse.com/flexbox-gap).
|
||||
{{< /callout >}}
|
||||
|
||||
## Vertical
|
||||
|
||||
@@ -203,7 +203,7 @@ You may also apply this break at specific breakpoints with our [responsive displ
|
||||
|
||||
### Order classes
|
||||
|
||||
Use `.order-` classes for controlling the **visual order** of your content. These classes are responsive, so you can set the `order` by breakpoint (e.g., `.order-1.order-md-2`). Includes support for `1` through `5` across all six grid tiers. If you need more `.order-*` classes, you can modify the default number via Sass variable.
|
||||
Use `.order-` classes for controlling the **visual order** of your content. These classes are responsive, so you can set the `order` by breakpoint (e.g., `.order-1.order-md-2`). Includes support for `1` through `5` across all six grid tiers.
|
||||
|
||||
{{< example class="bd-example-row" >}}
|
||||
<div class="container text-center">
|
||||
@@ -239,6 +239,28 @@ There are also responsive `.order-first` and `.order-last` classes that change t
|
||||
</div>
|
||||
{{< /example >}}
|
||||
|
||||
If you need more `.order-*` classes, you can add new ones by modifying our `$utilities` Sass map. [Read our Sass maps and loops docs]({{< docsref "/customize/sass#maps-and-loops" >}}) or [our Modify utilities docs]({{< docsref "/utilities/api#modify-utilities" >}}) for details.
|
||||
|
||||
```scss
|
||||
$utilities: map-merge(
|
||||
$utilities,
|
||||
(
|
||||
"order": map-merge(
|
||||
map-get($utilities, "order"),
|
||||
(
|
||||
values: map-merge(
|
||||
map-get(map-get($utilities, "order"), "values"),
|
||||
(
|
||||
6: 6, // Add a new `.order-{breakpoint}-6` utility
|
||||
last: 7 // Change the `.order-{breakpoint}-last` utility to use the next number
|
||||
)
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
```
|
||||
|
||||
### Offsetting columns
|
||||
|
||||
You can offset grid columns in two ways: our responsive `.offset-` grid classes and our [margin utilities]({{< docsref "/utilities/spacing" >}}). Grid classes are sized to match columns while margins are more useful for quick layouts where the width of the offset is variable.
|
||||
|
||||
@@ -431,7 +431,7 @@ Want more information? [Read the v5.1.0 blog post.](https://blog.getbootstrap.co
|
||||
|
||||
- Added new tints and shades for every color, providing nine separate colors for each base color, as new Sass variables.
|
||||
|
||||
- Improved color contrast. Bumped color contrast ratio from 3:1 to 4.5:1 and updated blue, green, cyan, and pink colors to ensure WCAG 2.1 AA contrast. Also changed our color contrast color from `$gray-900` to `$black`.
|
||||
- Improved color contrast. Bumped color contrast ratio from 3:1 to 4.5:1 and updated blue, green, cyan, and pink colors to ensure WCAG 2.2 AA contrast. Also changed our color contrast color from `$gray-900` to `$black`.
|
||||
|
||||
- To support our color system, we've added new custom `tint-color()` and `shade-color()` functions to mix our colors appropriately.
|
||||
|
||||
@@ -445,7 +445,7 @@ Want more information? [Read the v5.1.0 blog post.](https://blog.getbootstrap.co
|
||||
|
||||
- Columns no longer have `position: relative` applied, so you may have to add `.position-relative` to some elements to restore that behavior.
|
||||
|
||||
- <span class="badge text-bg-danger">Breaking</span> Dropped several `.order-*` classes that often went unused. We now only provide `.order-1` to `.order-5` out of the box.
|
||||
- <span class="badge text-bg-danger">Breaking</span> Dropped several `.order-*` classes that often went unused. We now only provide `.order-0` to `.order-5` out of the box.
|
||||
|
||||
- <span class="badge text-bg-danger">Breaking</span> Dropped the `.media` component as it can be easily replicated with utilities. [See #28265](https://github.com/twbs/bootstrap/pull/28265) and the [flex utilities page for an example]({{< docsref "/utilities/flex#media-object" >}}).
|
||||
|
||||
|
||||
@@ -452,7 +452,8 @@ You can enable responsive classes for an existing set of utilities that are not
|
||||
@import "bootstrap/scss/utilities";
|
||||
|
||||
$utilities: map-merge(
|
||||
$utilities, (
|
||||
$utilities,
|
||||
(
|
||||
"border": map-merge(
|
||||
map-get($utilities, "border"),
|
||||
( responsive: true ),
|
||||
@@ -508,7 +509,8 @@ Missing v4 utilities, or used to another naming convention? The utilities API ca
|
||||
@import "bootstrap/scss/utilities";
|
||||
|
||||
$utilities: map-merge(
|
||||
$utilities, (
|
||||
$utilities,
|
||||
(
|
||||
"margin-start": map-merge(
|
||||
map-get($utilities, "margin-start"),
|
||||
( class: ml ),
|
||||
@@ -574,13 +576,11 @@ $utilities: map-merge(
|
||||
(
|
||||
// Remove the `width` utility
|
||||
"width": null,
|
||||
|
||||
// Make an existing utility responsive
|
||||
"border": map-merge(
|
||||
map-get($utilities, "border"),
|
||||
( responsive: true ),
|
||||
),
|
||||
|
||||
// Add new utilities
|
||||
"cursor": (
|
||||
property: cursor,
|
||||
|
||||
@@ -55,7 +55,7 @@ For faster mobile-friendly development, use responsive display classes for showi
|
||||
|
||||
To hide elements simply use the `.d-none` class or one of the `.d-{sm,md,lg,xl,xxl}-none` classes for any responsive screen variation.
|
||||
|
||||
To show an element only on a given interval of screen sizes you can combine one `.d-*-none` class with a `.d-*-*` class, for example `.d-none .d-md-block .d-xl-none .d-xxl-none` will hide the element for all screen sizes except on medium and large devices.
|
||||
To show an element only on a given interval of screen sizes you can combine one `.d-*-none` class with a `.d-*-*` class, for example `.d-none .d-md-block .d-xl-none` will hide the element for all screen sizes except on medium and large devices.
|
||||
|
||||
{{< bs-table >}}
|
||||
| Screen size | Class |
|
||||
|
||||
@@ -103,11 +103,11 @@ The syntax is nearly the same as the default, positive margin utilities, but wit
|
||||
When using `display: grid` or `display: flex`, you can make use of `gap` utilities on the parent element. This can save on having to add margin utilities to individual children of a grid or flex container. Gap utilities are responsive by default, and are generated via our utilities API, based on the `$spacers` Sass map.
|
||||
|
||||
{{< example class="bd-example-cssgrid" >}}
|
||||
<div class="grid gap-3">
|
||||
<div class="p-2 g-col-6">Grid item 1</div>
|
||||
<div class="p-2 g-col-6">Grid item 2</div>
|
||||
<div class="p-2 g-col-6">Grid item 3</div>
|
||||
<div class="p-2 g-col-6">Grid item 4</div>
|
||||
<div style="grid-template-columns: 1fr 1fr;" class="d-grid gap-3">
|
||||
<div class="p-2">Grid item 1</div>
|
||||
<div class="p-2">Grid item 2</div>
|
||||
<div class="p-2">Grid item 3</div>
|
||||
<div class="p-2">Grid item 4</div>
|
||||
</div>
|
||||
{{< /example >}}
|
||||
|
||||
@@ -118,11 +118,11 @@ Support includes responsive options for all of Bootstrap's grid breakpoints, as
|
||||
`row-gap` sets the vertical space between children items in the specified container.
|
||||
|
||||
{{< example class="bd-example-cssgrid" >}}
|
||||
<div class="grid gap-0 row-gap-3">
|
||||
<div class="p-2 g-col-6">Grid item 1</div>
|
||||
<div class="p-2 g-col-6">Grid item 2</div>
|
||||
<div class="p-2 g-col-6">Grid item 3</div>
|
||||
<div class="p-2 g-col-6">Grid item 4</div>
|
||||
<div style="grid-template-columns: 1fr 1fr;" class="d-grid gap-0 row-gap-3">
|
||||
<div class="p-2">Grid item 1</div>
|
||||
<div class="p-2">Grid item 2</div>
|
||||
<div class="p-2">Grid item 3</div>
|
||||
<div class="p-2">Grid item 4</div>
|
||||
</div>
|
||||
{{< /example >}}
|
||||
|
||||
@@ -131,11 +131,11 @@ Support includes responsive options for all of Bootstrap's grid breakpoints, as
|
||||
`column-gap` sets the horizontal space between children items in the specified container.
|
||||
|
||||
{{< example class="bd-example-cssgrid" >}}
|
||||
<div class="grid gap-0 column-gap-3">
|
||||
<div class="p-2 g-col-6">Grid item 1</div>
|
||||
<div class="p-2 g-col-6">Grid item 2</div>
|
||||
<div class="p-2 g-col-6">Grid item 3</div>
|
||||
<div class="p-2 g-col-6">Grid item 4</div>
|
||||
<div style="grid-template-columns: 1fr 1fr;" class="d-grid gap-0 column-gap-3">
|
||||
<div class="p-2">Grid item 1</div>
|
||||
<div class="p-2">Grid item 2</div>
|
||||
<div class="p-2">Grid item 3</div>
|
||||
<div class="p-2">Grid item 4</div>
|
||||
</div>
|
||||
{{< /example >}}
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
{{ if (eq $i 0) }}<div class="row">{{ end }}
|
||||
{{ if $entry.external -}}
|
||||
<div class="col-md-6 col-lg-4 mb-3 d-flex gap-3">
|
||||
<svg class="bi fs-5 flex-shrink-0 mt-1"><use xlink:href="#box-seam"></use></svg>
|
||||
<svg class="bi fs-5 flex-shrink-0 mt-1" aria-hidden="true"><use xlink:href="#box-seam"></use></svg>
|
||||
<div>
|
||||
<h3 class="h5 mb-1">
|
||||
<a class="d-block link-offset-1" href="{{ urls.JoinPath $.Site.Params.github_org $example.url }}" target="_blank" rel="noopener">
|
||||
<a class="d-block link-offset-1" href="{{ urls.JoinPath $.Site.Params.github_org $example.url }}" target="_blank" rel="noopener" id="starter-{{ $i }}">
|
||||
{{ $example.name }}
|
||||
</a>
|
||||
</h3>
|
||||
@@ -26,9 +26,9 @@
|
||||
<p>
|
||||
{{- $indexPath := default "index.html" $example.indexPath -}}
|
||||
{{- $stackBlitzUrl := printf "%s%s%s" (urls.JoinPath "https://stackblitz.com/github/twbs" $example.url) "?file=" ($indexPath | urlquery) }}
|
||||
<a class="icon-link small link-secondary link-offset-1" href="{{ $stackBlitzUrl }}" target="_blank" rel="noopener">
|
||||
<svg class="bi flex-shrink-0"><use xlink:href="#lightning-charge-fill"></use></svg>
|
||||
Edit in StackBlitz
|
||||
<a class="icon-link small link-secondary link-offset-1" href="{{ $stackBlitzUrl }}" target="_blank" rel="noopener" aria-labelledby="edit-{{ $i }} starter-{{ $i }}">
|
||||
<svg class="bi flex-shrink-0" aria-hidden="true"><use xlink:href="#lightning-charge-fill"></use></svg>
|
||||
<span id="edit-{{ $i }}">Edit in StackBlitz</span>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<section class="pb-md-5 mb-5">
|
||||
<div class="col-lg-8 mb-5">
|
||||
<div class="masthead-followup-icon d-inline-block mb-3 me-2" style="--bg-rgb: var(--bs-danger-rgb);">
|
||||
<svg class="bi fs-1"><use xlink:href="#menu-button-wide-fill"></use></svg>
|
||||
<svg class="bi fs-1" aria-hidden="true"><use xlink:href="#menu-button-wide-fill"></use></svg>
|
||||
</div>
|
||||
<svg class="bi me-2 fs-2 text-body-secondary"><use xlink:href="#plus"></use></svg>
|
||||
<svg class="bi me-2 fs-2 text-body-secondary" aria-hidden="true"><use xlink:href="#plus"></use></svg>
|
||||
<div class="masthead-followup-icon d-inline-block mb-3" style="--bg-rgb: var(--bs-info-rgb);">
|
||||
<svg class="bi fs-1"><use xlink:href="#braces-asterisk"></use></svg>
|
||||
<svg class="bi fs-1" aria-hidden="true"><use xlink:href="#braces-asterisk"></use></svg>
|
||||
</div>
|
||||
<h2 class="display-5 mb-3 fw-semibold lh-sm">Components, meet the Utility API</h2>
|
||||
<p class="lead fw-normal">
|
||||
@@ -52,10 +52,10 @@
|
||||
</li>
|
||||
</ul>
|
||||
`) "html" "" }}
|
||||
<p class="d-flex justify-content-start mb-md-0">
|
||||
<p class="d-flex mb-md-0">
|
||||
<a href="/docs/{{ .Site.Params.docs_version }}/examples/#snippets" class="icon-link icon-link-hover fw-semibold">
|
||||
Explore customized components
|
||||
<svg class="bi"><use xlink:href="#arrow-right"></use></svg>
|
||||
<svg class="bi" aria-hidden="true"><use xlink:href="#arrow-right"></use></svg>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
@@ -77,10 +77,10 @@ $utilities: map-merge(
|
||||
);
|
||||
`) "scss" "" }}
|
||||
|
||||
<p class="d-flex justify-content-start mb-md-0">
|
||||
<p class="d-flex mb-md-0">
|
||||
<a href="/docs/{{ .Site.Params.docs_version }}/utilities/api/" class="icon-link icon-link-hover fw-semibold mb-3">
|
||||
Explore the utility API
|
||||
<svg class="bi"><use xlink:href="#arrow-right"></use></svg>
|
||||
<svg class="bi" aria-hidden="true"><use xlink:href="#arrow-right"></use></svg>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<section class="row g-md-5 pb-md-5 mb-5 align-items-center">
|
||||
<div class="col-lg-8 mb-5">
|
||||
<div class="masthead-followup-icon d-inline-block mb-3" style="--bg-rgb: var(--bd-pink-rgb);">
|
||||
<svg class="bi fs-1"><use xlink:href="#braces"></use></svg>
|
||||
<svg class="bi fs-1" aria-hidden="true"><use xlink:href="#braces"></use></svg>
|
||||
</div>
|
||||
<h2 class="display-5 mb-3 fw-semibold lh-sm">Build and extend in real-time with CSS variables</h2>
|
||||
<p class="lead fw-normal">
|
||||
Bootstrap 5 is evolving with each release to better utilize CSS variables for global theme styles, individual components, and even utilities. We provide dozens of variables for colors, font styles, and more at a <code>:root</code> level for use anywhere. On components and utilities, CSS variables are scoped to the relevant class and can easily be modified.
|
||||
</p>
|
||||
<p class="d-flex align-items-start flex-column lead fw-normal mb-0">
|
||||
<p class="d-flex flex-column lead fw-normal mb-0">
|
||||
<a href="/docs/{{ .Site.Params.docs_version }}/customize/css-variables/" class="icon-link icon-link-hover fw-semibold mb-3">
|
||||
Learn more about CSS variables
|
||||
<svg class="bi"><use xlink:href="#arrow-right"></use></svg>
|
||||
<svg class="bi" aria-hidden="true"><use xlink:href="#arrow-right"></use></svg>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<section class="col-lg-7 mb-5">
|
||||
<div class="masthead-followup-icon d-inline-block mb-3" style="--bg-rgb: var(--bs-primary-rgb);">
|
||||
<svg class="bi fs-1"><use xlink:href="#palette2"></use></svg>
|
||||
<svg class="bi fs-1" aria-hidden="true"><use xlink:href="#palette2"></use></svg>
|
||||
</div>
|
||||
<h2 class="display-5 mb-3 fw-semibold lh-sm">Customize everything with Sass</h2>
|
||||
<p class="lead fw-normal">
|
||||
Bootstrap utilizes Sass for a modular and customizable architecture. Import only the components you need, enable global options like gradients and shadows, and write your own CSS with our variables, maps, functions, and mixins.
|
||||
</p>
|
||||
<p class="d-flex justify-content-start lead fw-normal">
|
||||
<p class="d-flex lead fw-normal">
|
||||
<a href="/docs/{{ .Site.Params.docs_version }}/customize/overview/" class="icon-link icon-link-hover fw-semibold">
|
||||
Learn more about customizing
|
||||
<svg class="bi"><use xlink:href="#arrow-right"></use></svg>
|
||||
<svg class="bi" aria-hidden="true"><use xlink:href="#arrow-right"></use></svg>
|
||||
</a>
|
||||
</p>
|
||||
</section>
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
<div class="col-lg-7 mx-auto pb-3 mb-3 mb-md-5 text-md-center">
|
||||
<div class="masthead-followup-icon d-inline-block mb-3" style="--bg-rgb: var(--bd-violet-rgb);">
|
||||
<svg class="bi fs-1"><use xlink:href="#code"></use></svg>
|
||||
<svg class="bi fs-1" aria-hidden="true"><use xlink:href="#code"></use></svg>
|
||||
</div>
|
||||
<h2 class="display-5 mb-3 fw-semibold lh-sm">Get started any way you want</h2>
|
||||
<p class="lead fw-normal">
|
||||
Jump right into building with Bootstrap—use the CDN, install it via package manager, or download the source code.
|
||||
</p>
|
||||
<p class="d-flex justify-content-md-start justify-content-md-center lead fw-normal">
|
||||
<p class="d-flex justify-content-md-center lead fw-normal">
|
||||
<a href="/docs/{{ .Site.Params.docs_version }}/getting-started/download/" class="icon-link icon-link-hover fw-semibold ps-md-4">
|
||||
Read installation docs
|
||||
<svg class="bi"><use xlink:href="#arrow-right"></use></svg>
|
||||
<svg class="bi" aria-hidden="true"><use xlink:href="#arrow-right"></use></svg>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<section class="row g-3 g-md-5 mb-5 pb-5 justify-content-center">
|
||||
<div class="col-lg-6 py-lg-4 pe-lg-5">
|
||||
<svg class="bi mb-2 fs-2 text-body-secondary"><use xlink:href="#box-seam"></use></svg>
|
||||
<svg class="bi mb-2 fs-2 text-body-secondary" aria-hidden="true"><use xlink:href="#box-seam"></use></svg>
|
||||
<h3 class="fw-semibold">Install via package manager</h3>
|
||||
<p class="pe-lg-5">
|
||||
Install Bootstrap’s source Sass and JavaScript files via npm, RubyGems, Composer, or Meteor. Package managed installs don’t include documentation or our full build scripts. You can also <a href="https://github.com/twbs/examples/">use any demo from our Examples repo</a> to quickly jumpstart Bootstrap projects.
|
||||
@@ -28,7 +28,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-lg-6 py-lg-4 ps-lg-5 border-lg-start">
|
||||
<svg class="bi mb-2 fs-2 text-body-secondary"><use xlink:href="#globe2"></use></svg>
|
||||
<svg class="bi mb-2 fs-2 text-body-secondary" aria-hidden="true"><use xlink:href="#globe2"></use></svg>
|
||||
<h3 class="fw-semibold">Include via CDN</h3>
|
||||
<p class="pe-lg-5">
|
||||
When you only need to include Bootstrap’s compiled CSS or JS, you can use <a href="https://www.jsdelivr.com/package/npm/bootstrap">jsDelivr</a>. See it in action with our simple <a href="/docs/{{ .Site.Params.docs_version }}/getting-started/introduction/#quick-start">quick start</a>, or <a href="/docs/{{ .Site.Params.docs_version }}/examples/">browse the examples</a> to jumpstart your next project. You can also choose to include Popper and our JS <a href="/docs/{{ .Site.Params.docs_version }}/getting-started/introduction/#separate">separately</a>.
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
<p class="lead fw-normal">
|
||||
<a href="{{ .Site.Params.icons }}">Bootstrap Icons</a> is an open source SVG icon library featuring over 1,800 glyphs, with more added every release. They're designed to work in any project, whether you use Bootstrap itself or not. Use them as SVGs or icon fonts—both options give you vector scaling and easy customization via CSS.
|
||||
</p>
|
||||
<p class="d-flex justify-content-start lead fw-normal mb-md-0">
|
||||
<p class="d-flex lead fw-normal mb-md-0">
|
||||
<a href="{{ .Site.Params.icons }}" class="icon-link icon-link-hover fw-semibold">
|
||||
Get Bootstrap Icons
|
||||
<svg class="bi"><use xlink:href="#arrow-right"></use></svg>
|
||||
<svg class="bi" aria-hidden="true"><use xlink:href="#arrow-right"></use></svg>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -3,11 +3,8 @@
|
||||
<div class="col-md-8 mx-auto text-center">
|
||||
<a class="d-flex flex-column flex-lg-row justify-content-center align-items-center mb-4 text-dark lh-sm text-decoration-none" href="https://www.herodevs.com/support/nes-bootstrap?utm_source=Bootstrap_site&utm_medium=Banner&utm_campaign=v3and4_eol" rel="noopener" target="_blank">
|
||||
<span class="d-sm-inline-flex align-items-center gap-1 py-2 px-3 me-2 mb-2 mb-lg-0 rounded-5 masthead-notice">
|
||||
<span class="fw-semibold">
|
||||
New!
|
||||
</span>
|
||||
Never-Ending Support for Bootstrap
|
||||
<svg class="bi" style="width: 20px; height: 20px;"><use xlink:href="#arrow-right-short"></use></svg>
|
||||
Get Security Updates for Bootstrap 3 & 4
|
||||
<svg class="bi" style="width: 20px; height: 20px;" aria-hidden="true"><use xlink:href="#arrow-right-short"></use></svg>
|
||||
</span>
|
||||
</a>
|
||||
{{ partial "responsive-img" (dict "context" .
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<section class="pb-md-5 mb-5">
|
||||
<div class="col-lg-8 mb-5">
|
||||
<div class="masthead-followup-icon d-inline-block mb-3" style="--bg-rgb: var(--bs-warning-rgb);">
|
||||
<svg class="bi fs-1"><use xlink:href="#plugin"></use></svg>
|
||||
<svg class="bi fs-1" aria-hidden="true"><use xlink:href="#plugin"></use></svg>
|
||||
</div>
|
||||
<h2 class="display-5 mb-3 fw-semibold lh-sm">Powerful JavaScript plugins without jQuery</h2>
|
||||
<p class="lead fw-normal">
|
||||
Add toggleable hidden elements, modals and offcanvas menus, popovers and tooltips, and so much more—all without jQuery. Bootstrap's JavaScript is HTML-first, meaning most plugins are added with <code>data</code> attributes in your HTML. Need more control? Include individual plugins programmatically.
|
||||
</p>
|
||||
<p class="d-flex justify-content-start lead fw-normal mb-md-0">
|
||||
<p class="d-flex lead fw-normal mb-md-0">
|
||||
<a href="/docs/{{ .Site.Params.docs_version }}/getting-started/javascript/" class="icon-link icon-link-hover fw-semibold">
|
||||
Learn more about Bootstrap JavaScript
|
||||
<svg class="bi"><use xlink:href="#arrow-right"></use></svg>
|
||||
<svg class="bi" aria-hidden="true"><use xlink:href="#arrow-right"></use></svg>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
<p class="lead fw-normal">
|
||||
Take Bootstrap to the next level with premium themes from the <a href="{{ .Site.Params.themes }}">official Bootstrap Themes marketplace</a>. Themes are built on Bootstrap as their own extended frameworks, rich with new components and plugins, documentation, and powerful build tools.
|
||||
</p>
|
||||
<p class="d-flex justify-content-start lead fw-normal mb-md-0">
|
||||
<p class="d-flex lead fw-normal mb-md-0">
|
||||
<a href="{{ .Site.Params.themes }}" class="icon-link icon-link-hover fw-semibold">
|
||||
Browse Bootstrap Themes
|
||||
<svg class="bi"><use xlink:href="#arrow-right"></use></svg>
|
||||
<svg class="bi" aria-hidden="true"><use xlink:href="#arrow-right"></use></svg>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg"{{ with .width }} width="{{ . }}"{{ end }}{{ with .height }} height="{{ . }}"{{ end }}{{ with .class }} class="{{ . }}"{{ end }} fill="currentColor" focusable="false" viewBox="0 0 16 16">
|
||||
<svg xmlns="http://www.w3.org/2000/svg"{{ with .width }} width="{{ . }}"{{ end }}{{ with .height }} height="{{ . }}"{{ end }}{{ with .class }} class="{{ . }}"{{ end }} fill="currentColor" viewBox="0 0 16 16" aria-hidden="true">
|
||||
<path d="M0 6a6 6 0 1112 0A6 6 0 010 6z"/>
|
||||
<path d="M12.93 5h1.57a.5.5 0 01.5.5v9a.5.5 0 01-.5.5h-9a.5.5 0 01-.5-.5v-1.57a6.953 6.953 0 01-1-.22v1.79A1.5 1.5 0 005.5 16h9a1.5 1.5 0 001.5-1.5v-9A1.5 1.5 0 0014.5 4h-1.79c.097.324.17.658.22 1z"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 482 B After Width: | Height: | Size: 483 B |
@@ -1,3 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg"{{ with .width }} width="{{ . }}"{{ end }}{{ with .height }} height="{{ . }}"{{ end }}{{ with .class }} class="{{ . }}"{{ end }} fill="currentColor" focusable="false" viewBox="0 0 16 16">
|
||||
<svg xmlns="http://www.w3.org/2000/svg"{{ with .width }} width="{{ . }}"{{ end }}{{ with .height }} height="{{ . }}"{{ end }}{{ with .class }} class="{{ . }}"{{ end }} fill="currentColor" viewBox="0 0 16 16" aria-hidden="true">
|
||||
<path fill-rule="evenodd" d="M8 16a6 6 0 006-6c0-1.655-1.122-2.904-2.432-4.362C10.254 4.176 8.75 2.503 8 0c0 0-6 5.686-6 10a6 6 0 006 6zM6.646 4.646c-.376.377-1.272 1.489-2.093 3.13l.894.448c.78-1.559 1.616-2.58 1.907-2.87l-.708-.708z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 494 B After Width: | Height: | Size: 495 B |
@@ -26,21 +26,21 @@
|
||||
</div>
|
||||
{{- end }}
|
||||
|
||||
<div class="d-flex align-items-center highlight-toolbar ps-3 pe-2 py-1">
|
||||
<small class="font-monospace text-body-secondary text-uppercase">{{ $lang }}</small>
|
||||
<div class="d-flex ms-auto">
|
||||
{{- if eq $show_preview true -}}
|
||||
<button type="button" class="btn-edit text-nowrap"{{ with $stackblitz_add_js }} data-sb-js-snippet="{{ $stackblitz_add_js }}"{{ end }} title="Try it on StackBlitz">
|
||||
<svg class="bi" aria-hidden="true"><use xlink:href="#lightning-charge-fill"/></svg>
|
||||
</button>
|
||||
{{- end -}}
|
||||
<button type="button" class="btn-clipboard mt-0 me-0" title="Copy to clipboard">
|
||||
{{- if eq $show_markup true -}}
|
||||
{{- if eq $show_preview true -}}
|
||||
<div class="d-flex align-items-center highlight-toolbar ps-3 pe-2 py-1 border-0 border-top border-bottom">
|
||||
<small class="font-monospace text-body-secondary text-uppercase">{{ $lang }}</small>
|
||||
<div class="d-flex ms-auto">
|
||||
<button type="button" class="btn-edit text-nowrap"{{ with $stackblitz_add_js }} data-sb-js-snippet="{{ $stackblitz_add_js }}"{{ end }} title="Try it on StackBlitz">
|
||||
<svg class="bi" aria-hidden="true"><use xlink:href="#lightning-charge-fill"/></svg>
|
||||
</button>
|
||||
<button type="button" class="btn-clipboard mt-0 me-0" title="Copy to clipboard">
|
||||
<svg class="bi" aria-hidden="true"><use xlink:href="#clipboard"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
{{- if eq $show_markup true -}}
|
||||
{{- $content = replaceRE `<svg class="bd-placeholder-img(?:-lg)?(?: *?bd-placeholder-img-lg)? ?(.*?)".*?<\/svg>` `<img src="..." class="$1" alt="...">` $content -}}
|
||||
{{- $content = replaceRE `<img class="bd-placeholder-img(?:-lg)?(?: *?bd-placeholder-img-lg)? ?(.*?)".*?>` `<img src="..." class="$1" alt="...">` $content -}}
|
||||
{{- $content = replaceRE ` (class=" *?")` "" $content -}}
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
{{- $match = replace $match $to_remove "" -}}
|
||||
{{- end -}}
|
||||
|
||||
<div class="bd-example-snippet bd-code-snippet">
|
||||
<div class="d-flex align-items-center highlight-toolbar ps-3 pe-2 py-1">
|
||||
<div class="bd-example-snippet bd-code-snippet bd-file-ref">
|
||||
<div class="d-flex align-items-center highlight-toolbar ps-3 pe-2 py-1 border-bottom">
|
||||
<a class="font-monospace link-secondary link-underline-secondary link-underline-opacity-0 link-underline-opacity-100-hover small" href="{{ .Site.Params.repo }}/blob/v{{ .Site.Params.current_version }}/{{ $file | replaceRE `\\` "/" }}">
|
||||
{{- $file -}}
|
||||
</a>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
{{- if $show_text }}%3Ctext%20x='50%25'%20y='50%25'%20fill='{{ replace $color "#" "%23" }}'%20dy='.3em'%3E{{ $text }}%3C/text%3E{{ end -}}
|
||||
%3C/svg%3E">
|
||||
{{- else -}}
|
||||
<svg class="bd-placeholder-img{{ with $class }} {{ . }}{{ end }}" width="{{ $width }}" height="{{ $height }}" xmlns="http://www.w3.org/2000/svg"{{ if (or $show_title $show_text) }} role="img" aria-label="{{ if $show_title }}{{ $title }}{{ if $show_text }}: {{ end }}{{ end }}{{ if ($show_text) }}{{ $text }}{{ end }}"{{ else }} aria-hidden="true"{{ end }} preserveAspectRatio="xMidYMid slice" focusable="false">
|
||||
<svg class="bd-placeholder-img{{ with $class }} {{ . }}{{ end }}" width="{{ $width }}" height="{{ $height }}" xmlns="http://www.w3.org/2000/svg"{{ if (or $show_title $show_text) }} role="img" aria-label="{{ if $show_title }}{{ $title }}{{ if $show_text }}: {{ end }}{{ end }}{{ if ($show_text) }}{{ $text }}{{ end }}"{{ else }} aria-hidden="true"{{ end }} preserveAspectRatio="xMidYMid slice">
|
||||
{{- if $show_title }}<title>{{ $title }}</title>{{ end -}}
|
||||
<rect width="100%" height="100%" fill="{{ $background }}"/>
|
||||
{{- if $show_text }}<text x="50%" y="50%" fill="{{ $color }}" dy=".3em">{{ $text }}</text>{{ end -}}
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
{{- $match = replace $match " !default" "" -}}
|
||||
{{- end -}}
|
||||
|
||||
<div class="bd-example-snippet bd-code-snippet">
|
||||
<div class="d-flex align-items-center highlight-toolbar ps-3 pe-2 py-1">
|
||||
<div class="bd-example-snippet bd-code-snippet bd-file-ref">
|
||||
<div class="d-flex align-items-center highlight-toolbar ps-3 pe-2 py-1 border-bottom">
|
||||
<a class="font-monospace link-secondary link-underline-secondary link-underline-opacity-0 link-underline-opacity-100-hover small" href="{{ .Site.Params.repo }}/blob/v{{ .Site.Params.current_version }}/{{ $file | replaceRE `\\` "/" }}">
|
||||
{{- $file -}}
|
||||
</a>
|
||||
|
||||
@@ -22,24 +22,10 @@
|
||||
|
||||
{{- $table := printf "<table%s>\n%s</table>" $table_attributes $table_content -}}
|
||||
|
||||
<div class="bd-example-snippet bd-code-snippet">
|
||||
<div class="bd-example m-0 border-0">
|
||||
<table{{ with $class }} class="{{ . }}"{{ end }}>
|
||||
{{ partialCached "table-content" . }}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center highlight-toolbar ps-3 pe-2 py-1">
|
||||
<small class="font-monospace text-body-secondary text-uppercase">html</small>
|
||||
<div class="d-flex ms-auto">
|
||||
<button type="button" class="btn-edit text-nowrap" title="Try it on StackBlitz">
|
||||
<svg class="bi" aria-hidden="true"><use xlink:href="#lightning-charge-fill"/></svg>
|
||||
</button>
|
||||
<button type="button" class="btn-clipboard mt-0 me-0" title="Copy to clipboard">
|
||||
<svg class="bi" aria-hidden="true"><use xlink:href="#clipboard"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{- highlight $table "html" "" -}}
|
||||
<div class="bd-example">
|
||||
<table{{ with $class }} class="{{ . }}"{{ end }}>
|
||||
{{ partialCached "table-content" . }}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{- highlight $table "html" "" -}}
|
||||
|
||||
Reference in New Issue
Block a user