diff --git a/.babelrc.js b/.babelrc.js
index 51399697f..1d6404edb 100644
--- a/.babelrc.js
+++ b/.babelrc.js
@@ -8,5 +8,10 @@ module.exports = {
modules: false
}
]
- ]
+ ],
+ env: {
+ test: {
+ plugins: [ 'istanbul' ]
+ }
+ }
};
diff --git a/.browserslistrc b/.browserslistrc
index b8e384bc9..1bfd19753 100644
--- a/.browserslistrc
+++ b/.browserslistrc
@@ -1,15 +1,13 @@
# https://github.com/browserslist/browserslist#readme
->= 0.5%
-last 2 major versions
+>= 1%
+last 1 major version
not dead
-Chrome >= 60
-Firefox >= 60
-# needed since Legacy Edge still has usage; 79 was the first Chromium Edge version
-# should be removed in the future when its usage drops or when it's moved to dead browsers
-not Edge < 79
-Firefox ESR
-iOS >= 10
-Safari >= 10
-Android >= 6
-not Explorer <= 11
+Chrome >= 45
+Firefox >= 38
+Edge >= 12
+Explorer >= 10
+iOS >= 9
+Safari >= 9
+Android >= 4.4
+Opera >= 30
diff --git a/.bundlewatch.config.json b/.bundlewatch.config.json
index da47da480..1b4444728 100644
--- a/.bundlewatch.config.json
+++ b/.bundlewatch.config.json
@@ -6,55 +6,39 @@
},
{
"path": "./dist/css/bootstrap-grid.min.css",
- "maxSize": "6 kB"
+ "maxSize": "6.25 kB"
},
{
"path": "./dist/css/bootstrap-reboot.css",
- "maxSize": "2.25 kB"
+ "maxSize": "2 kB"
},
{
"path": "./dist/css/bootstrap-reboot.min.css",
"maxSize": "2 kB"
},
- {
- "path": "./dist/css/bootstrap-utilities.css",
- "maxSize": "7.5 kB"
- },
- {
- "path": "./dist/css/bootstrap-utilities.min.css",
- "maxSize": "6.75 kB"
- },
{
"path": "./dist/css/bootstrap.css",
- "maxSize": "24 kB"
+ "maxSize": "25.5 kB"
},
{
"path": "./dist/css/bootstrap.min.css",
- "maxSize": "22 kB"
+ "maxSize": "23.5 kB"
},
{
"path": "./dist/js/bootstrap.bundle.js",
- "maxSize": "41 kB"
+ "maxSize": "48 kB"
},
{
"path": "./dist/js/bootstrap.bundle.min.js",
"maxSize": "21.5 kB"
},
- {
- "path": "./dist/js/bootstrap.esm.js",
- "maxSize": "27 kB"
- },
- {
- "path": "./dist/js/bootstrap.esm.min.js",
- "maxSize": "18 kB"
- },
{
"path": "./dist/js/bootstrap.js",
- "maxSize": "28 kB"
+ "maxSize": "25.5 kB"
},
{
"path": "./dist/js/bootstrap.min.js",
- "maxSize": "15.5 kB"
+ "maxSize": "14.75 kB"
}
],
"ci": {
diff --git a/.editorconfig b/.editorconfig
index f29d257cc..9d5248e86 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -9,3 +9,6 @@ indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
+
+[*.md]
+trim_trailing_whitespace = false
diff --git a/.eslintrc.json b/.eslintrc.json
index d5a54d46b..c5b351816 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -21,10 +21,6 @@
"warn",
5
],
- "multiline-ternary": [
- "error",
- "always-multiline"
- ],
"new-cap": [
"error",
{
@@ -32,6 +28,8 @@
}
],
"no-console": "error",
+ "no-mixed-operators": "off",
+ "no-negated-condition": "off",
"object-curly-spacing": [
"error",
"always"
@@ -43,16 +41,23 @@
],
"unicorn/consistent-function-scoping": "off",
"unicorn/explicit-length-check": "off",
+ "unicorn/import-index": "off",
"unicorn/no-array-callback-reference": "off",
"unicorn/no-for-loop": "off",
"unicorn/no-null": "off",
"unicorn/no-unused-properties": "error",
"unicorn/no-useless-undefined": "off",
- "unicorn/prefer-dom-node-append": "off",
+ "unicorn/prefer-array-find": "off",
"unicorn/prefer-dom-node-dataset": "off",
+ "unicorn/prefer-includes": "off",
+ "unicorn/prefer-math-trunc": "off",
+ "unicorn/prefer-dom-node-append": "off",
"unicorn/prefer-dom-node-remove": "off",
+ "unicorn/prefer-number-properties": "off",
"unicorn/prefer-optional-catch-binding": "off",
"unicorn/prefer-query-selector": "off",
+ "unicorn/prefer-reflect-apply": "off",
+ "unicorn/prefer-set-has": "off",
"unicorn/prevent-abbreviations": "off"
}
}
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 32b30cdb3..296b13741 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -19,7 +19,7 @@ and [submitting pull requests](#pull-requests), but please respect the following
restrictions:
* Please **do not** use the issue tracker for personal support requests. Stack
- Overflow ([`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5) tag),
+ Overflow ([`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4) tag),
[Slack](https://bootstrap-slack.herokuapp.com/) or [IRC](README.md#community) are better places to get help.
* Please **do not** derail or troll issues. Keep the discussion on topic and
@@ -58,14 +58,14 @@ Good bug reports are extremely helpful, so thanks!
Guidelines for bug reports:
-0. **[Validate your HTML](https://html5.validator.nu/)** to ensure your
+0. **[validate your HTML](https://html5.validator.nu/)** to ensure your
problem isn't caused by a simple error in your own code.
1. **Use the GitHub issue search** — check if the issue has already been
reported.
2. **Check if the issue has been fixed** — try to reproduce it using the
- latest `main` (or `v4-dev` branch if the issue is about v4) in the repository.
+ latest `master` or `v4-dev` branch in the repository.
3. **Isolate the problem** — ideally create a [reduced test
case](https://css-tricks.com/reduced-test-cases/) and a live example.
@@ -100,6 +100,7 @@ Example:
### Reporting upstream browser bugs
Sometimes bugs reported to us are actually caused by bugs in the browser(s) themselves, not bugs in Bootstrap per se.
+When feasible, we aim to report such upstream bugs to the relevant browser vendor(s), and then list them on our [Wall of Browser Bugs](https://getbootstrap.com/browser-bugs/) and [document them in MDN](https://developer.mozilla.org/en-US/docs/Web).
| Vendor(s) | Browser(s) | Rendering engine | Bug reporting website(s) | Notes |
| ------------- | ---------------------------- | ---------------- | ------------------------------------------------------ | -------------------------------------------------------- |
@@ -136,12 +137,12 @@ project (indentation, accurate comments, etc.) and any other requirements
**Do not edit `bootstrap.css` or `bootstrap.js`, and do not commit
any dist files (`dist/` or `js/dist`).** Those files are automatically generated by our build tools. You should
-edit the source files in [`/bootstrap/scss/`](https://github.com/twbs/bootstrap/tree/main/scss)
-and/or [`/bootstrap/js/src/`](https://github.com/twbs/bootstrap/tree/main/js/src) instead.
+edit the source files in [`/bootstrap/scss/`](https://github.com/twbs/bootstrap/tree/v4-dev/scss)
+and/or [`/bootstrap/js/src/`](https://github.com/twbs/bootstrap/tree/v4-dev/js/src) instead.
Similarly, when contributing to Bootstrap's documentation, you should edit the
documentation source files in
-[the `/bootstrap/site/content/docs/` directory of the `main` branch](https://github.com/twbs/bootstrap/tree/main/site/content/docs).
+[the `/bootstrap/site/content/docs/` directory of the `v4-dev` branch](https://github.com/twbs/bootstrap/tree/v4-dev/site/content/docs).
**Do not edit the `gh-pages` branch.** That branch is generated from the
documentation source files and is managed separately by the Bootstrap Core Team.
@@ -163,8 +164,8 @@ included in the project:
2. If you cloned a while ago, get the latest changes from upstream:
```bash
- git checkout main
- git pull upstream main
+ git checkout v4-dev
+ git pull upstream v4-dev
```
3. Create a new topic branch (off the main project development branch) to
@@ -183,7 +184,7 @@ included in the project:
5. Locally merge (or rebase) the upstream development branch into your topic branch:
```bash
- git pull [--rebase] upstream main
+ git pull [--rebase] upstream v4-dev
```
6. Push your topic branch up to your fork:
@@ -193,7 +194,7 @@ included in the project:
```
7. [Open a Pull Request](https://help.github.com/articles/about-pull-requests/)
- with a clear title and description against the `main` branch.
+ with a clear title and description against the `v4-dev` branch.
**IMPORTANT**: By submitting a patch, you agree to allow the project owners to
license your work under the terms of the [MIT License](../LICENSE) (if it
@@ -225,6 +226,7 @@ includes code changes) and under the terms of the
- 2 spaces (no tabs)
- strict mode
- "Attractive"
+- Don't use [jQuery event alias convenience methods](https://github.com/jquery/jquery/blob/master/src/event/alias.js) (such as `$().focus()`). Instead, use [`$().trigger(eventType, ...)`](https://api.jquery.com/trigger/) or [`$().on(eventType, ...)`](https://api.jquery.com/on/), depending on whether you're firing an event or listening for an event. (For example, `$().trigger('focus')` or `$().on('focus', function (event) { /* handle focus event */ })`) We do this to be compatible with custom builds of jQuery where the event aliases module has been excluded.
### Checking coding style
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
deleted file mode 100644
index 43ea984ba..000000000
--- a/.github/FUNDING.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-# These are supported funding model platforms
-
-open_collective: bootstrap
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 70dcfd532..4899d4de2 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -11,10 +11,10 @@ Before opening:
- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
- [Validate](https://html5.validator.nu/) any HTML to avoid common problems
-- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md)
+- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/v4-dev/.github/CONTRIBUTING.md)
Bug reports must include:
- Operating system and version (Windows, macOS, Android, iOS)
-- Browser and version (Chrome, Firefox, Safari, Microsoft Edge, Opera, Android Browser)
+- Browser and version (Chrome, Firefox, Safari, Internet Explorer, Microsoft Edge, Opera, Android Browser)
- A [reduced test case](https://css-tricks.com/reduced-test-cases/) or suggested fix using [CodePen](https://codepen.io/) or [JS Bin](https://jsbin.com/)
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
deleted file mode 100644
index 2913b45f0..000000000
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-contact_links:
- - name: Ask a question
- url: https://github.com/twbs/bootstrap/discussions/new
- about: Ask and discuss questions with other Bootstrap community members
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
index 422fa2bb4..db44076d9 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -10,7 +10,7 @@ assignees: ''
Before opening:
- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
-- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md)
+- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/v4-dev/.github/CONTRIBUTING.md)
Feature requests must include:
diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md
index c30bed3b4..de3c4b552 100644
--- a/.github/SUPPORT.md
+++ b/.github/SUPPORT.md
@@ -8,4 +8,4 @@ For general troubleshooting or help getting started:
- Join [the official Slack room](https://bootstrap-slack.herokuapp.com/).
- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.
-- Ask and explore Stack Overflow with the [`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5) tag.
+- Ask and explore Stack Overflow with the [`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4) tag.
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
deleted file mode 100644
index 29135b400..000000000
--- a/.github/dependabot.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-version: 2
-updates:
- - package-ecosystem: npm
- directory: "/"
- schedule:
- interval: weekly
- day: tuesday
- time: "12:00"
- timezone: Europe/Athens
- open-pull-requests-limit: 10
- reviewers:
- - XhmikosR
- labels:
- - dependencies
- - v5
- versioning-strategy: increase
- rebase-strategy: disabled
- - package-ecosystem: "github-actions"
- directory: "/"
- schedule:
- interval: weekly
- day: tuesday
- time: "12:00"
- timezone: Europe/Athens
diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml
deleted file mode 100644
index e2b70e03e..000000000
--- a/.github/release-drafter.yml
+++ /dev/null
@@ -1,54 +0,0 @@
-name-template: 'v$NEXT_MAJOR_VERSION'
-tag-template: 'v$NEXT_MAJOR_VERSION'
-prerelease: true
-exclude-labels:
- - 'skip-changelog'
-categories:
- - title: '❗ Breaking Changes'
- labels:
- - 'breaking-change'
- - title: '🚀 Features'
- labels:
- - 'new-feature'
- - 'feature'
- - 'enhancement'
- - title: '🐛 Bug fixes'
- labels:
- - 'fix'
- - 'bugfix'
- - 'bug'
- - title: '⚡ Performance Improvements'
- labels:
- - 'performance'
- - title: '🎨 CSS'
- labels:
- - 'css'
- - title: '☕️ JavaScript'
- labels:
- - 'js'
- - title: '📖 Docs'
- labels:
- - 'docs'
- - title: '🌎 Accessibility'
- labels:
- - 'accessibility'
- - title: '🔧 Utility API'
- labels:
- - 'utility API'
- - 'utilities'
- - title: '🏭 Tests'
- labels:
- - 'tests'
- - title: '🧰 Misc'
- labels:
- - 'build'
- - 'meta'
- - 'chore'
- - 'CI'
- - title: '📦 Dependencies'
- labels:
- - 'dependencies'
-change-template: '- #$NUMBER: $TITLE'
-template: |
- ## Changes
- $CHANGES
diff --git a/.github/workflows/bundlewatch.yml b/.github/workflows/bundlewatch.yml
index b2bd5eed5..16736b5cc 100644
--- a/.github/workflows/bundlewatch.yml
+++ b/.github/workflows/bundlewatch.yml
@@ -42,4 +42,4 @@ jobs:
run: npm run bundlewatch
env:
BUNDLEWATCH_GITHUB_TOKEN: "${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}"
- CI_BRANCH_BASE: main
+ CI_BRANCH_BASE: v4-dev
diff --git a/.github/workflows/node-sass.yml b/.github/workflows/dart-sass.yml
similarity index 58%
rename from .github/workflows/node-sass.yml
rename to .github/workflows/dart-sass.yml
index ee64b2152..2b867d6bd 100644
--- a/.github/workflows/node-sass.yml
+++ b/.github/workflows/dart-sass.yml
@@ -1,4 +1,4 @@
-name: CSS (node-sass)
+name: CSS (Dart Sass)
on:
push:
@@ -23,8 +23,8 @@ jobs:
with:
node-version: "${{ env.NODE }}"
- - name: Build CSS with node-sass
+ - name: Build CSS with Dart Sass
run: |
- npx --package node-sass@latest node-sass --version
- npx --package node-sass@latest node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 scss/ -o dist-sass/css/
+ npx --package sass@latest sass --version
+ npx --package sass@latest sass --style expanded --source-map --embed-sources --no-error-css scss/:dist-sass/css/
ls -Al dist-sass/css
diff --git a/.github/workflows/release-notes.yml b/.github/workflows/release-notes.yml
deleted file mode 100644
index 1c4f4be9b..000000000
--- a/.github/workflows/release-notes.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-name: Release notes
-
-on:
- push:
- branches:
- - main
-
-jobs:
- update_release_draft:
- runs-on: ubuntu-latest
- steps:
- - uses: release-drafter/release-drafter@v5
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.gitignore b/.gitignore
index 0a0f88d15..ef7b47d4b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,6 @@
# Ignore docs files
/_gh_pages/
-# Hugo resources folder
+# Hugo folders
/resources/
# Numerous always-ignore extensions
diff --git a/.stylelintrc b/.stylelintrc
index c068d30b5..b9bde72db 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -8,9 +8,7 @@
"outline": "none"
},
"function-disallowed-list": [
- "calc",
- "lighten",
- "darken"
+ "calc"
],
"property-disallowed-list": [
"border-radius",
@@ -19,13 +17,6 @@
"border-bottom-right-radius",
"border-bottom-left-radius",
"transition"
- ],
- "scss/dollar-variable-default": [
- true,
- {
- "ignore": "local"
- }
- ],
- "scss/selector-no-union-class-name": true
+ ]
}
}
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index 5c6a4e727..0d2e52695 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo
Examples of behavior that contributes to creating a positive environment include:
-- Using welcoming and inclusive language
-- Being respectful of differing viewpoints and experiences
-- Gracefully accepting constructive criticism
-- Focusing on what is best for the community
-- Showing empathy towards other community members
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
-- The use of sexualized language or imagery and unwelcome sexual attention or advances
-- Trolling, insulting/derogatory comments, and personal or political attacks
-- Public or private harassment
-- Publishing others' private information, such as a physical or electronic address, without explicit permission
-- Other conduct which could reasonably be considered inappropriate in a professional setting
+* The use of sexualized language or imagery and unwelcome sexual attention or advances
+* Trolling, insulting/derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or electronic address, without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
diff --git a/README.md b/README.md
index f41498691..51cd31c90 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
` all receive top and bottom margins. We nuke the top\n// margin for easier control within type scales as it avoids margin collapsing.\n\n%heading {\n margin-top: 0; // 1\n margin-bottom: $headings-margin-bottom;\n font-family: $headings-font-family;\n font-style: $headings-font-style;\n font-weight: $headings-font-weight;\n line-height: $headings-line-height;\n color: $headings-color;\n}\n\nh1 {\n @extend %heading;\n @include font-size($h1-font-size);\n}\n\nh2 {\n @extend %heading;\n @include font-size($h2-font-size);\n}\n\nh3 {\n @extend %heading;\n @include font-size($h3-font-size);\n}\n\nh4 {\n @extend %heading;\n @include font-size($h4-font-size);\n}\n\nh5 {\n @extend %heading;\n @include font-size($h5-font-size);\n}\n\nh6 {\n @extend %heading;\n @include font-size($h6-font-size);\n}\n\n\n// Reset margins on paragraphs\n//\n// Similarly, the top margin on `
`s get reset. However, we also reset the\n// bottom margin to use `rem` units instead of `em`.\n\np {\n margin-top: 0;\n margin-bottom: $paragraph-margin-bottom;\n}\n\n\n// Abbreviations\n//\n// 1. Duplicate behavior to the data-bs-* attribute for our tooltip plugin\n// 2. Add the correct text decoration in Chrome, Edge, Opera, and Safari.\n// 3. Add explicit cursor to indicate changed behavior.\n// 4. Prevent the text-decoration to be skipped.\n\nabbr[title],\nabbr[data-bs-original-title] { // 1\n text-decoration: underline; // 2\n text-decoration: underline dotted; // 2\n cursor: help; // 3\n text-decoration-skip-ink: none; // 4\n}\n\n\n// Address\n\naddress {\n margin-bottom: 1rem;\n font-style: normal;\n line-height: inherit;\n}\n\n\n// Lists\n\nol,\nul {\n padding-left: 2rem;\n}\n\nol,\nul,\ndl {\n margin-top: 0;\n margin-bottom: 1rem;\n}\n\nol ol,\nul ul,\nol ul,\nul ol {\n margin-bottom: 0;\n}\n\ndt {\n font-weight: $dt-font-weight;\n}\n\n// 1. Undo browser default\n\ndd {\n margin-bottom: .5rem;\n margin-left: 0; // 1\n}\n\n\n// Blockquote\n\nblockquote {\n margin: 0 0 1rem;\n}\n\n\n// Strong\n//\n// Add the correct font weight in Chrome, Edge, and Safari\n\nb,\nstrong {\n font-weight: $font-weight-bolder;\n}\n\n\n// Small\n//\n// Add the correct font size in all browsers\n\nsmall {\n @include font-size($small-font-size);\n}\n\n\n// Mark\n\nmark {\n padding: $mark-padding;\n background-color: $mark-bg;\n}\n\n\n// Sub and Sup\n//\n// Prevent `sub` and `sup` elements from affecting the line height in\n// all browsers.\n\nsub,\nsup {\n position: relative;\n @include font-size($sub-sup-font-size);\n line-height: 0;\n vertical-align: baseline;\n}\n\nsub { bottom: -.25em; }\nsup { top: -.5em; }\n\n\n// Links\n\na {\n color: $link-color;\n text-decoration: $link-decoration;\n\n &:hover {\n color: $link-hover-color;\n text-decoration: $link-hover-decoration;\n }\n}\n\n// And undo these styles for placeholder links/named anchors (without href).\n// It would be more straightforward to just use a[href] in previous block, but that\n// causes specificity issues in many other styles that are too complex to fix.\n// See https://github.com/twbs/bootstrap/issues/19402\n\na:not([href]):not([class]) {\n &,\n &:hover {\n color: inherit;\n text-decoration: none;\n }\n}\n\n\n// Code\n\npre,\ncode,\nkbd,\nsamp {\n font-family: $font-family-code;\n @include font-size(1em); // Correct the odd `em` font sizing in all browsers.\n direction: ltr #{\"/* rtl:ignore */\"};\n unicode-bidi: bidi-override;\n}\n\n// 1. Remove browser default top margin\n// 2. Reset browser default of `1em` to use `rem`s\n// 3. Don't allow content to break outside\n\npre {\n display: block;\n margin-top: 0; // 1\n margin-bottom: 1rem; // 2\n overflow: auto; // 3\n @include font-size($code-font-size);\n color: $pre-color;\n\n // Account for some code outputs that place code tags in pre tags\n code {\n @include font-size(inherit);\n color: inherit;\n word-break: normal;\n }\n}\n\ncode {\n @include font-size($code-font-size);\n color: $code-color;\n word-wrap: break-word;\n\n // Streamline the style when inside anchors to avoid broken underline and more\n a > & {\n color: inherit;\n }\n}\n\nkbd {\n padding: $kbd-padding-y $kbd-padding-x;\n @include font-size($kbd-font-size);\n color: $kbd-color;\n background-color: $kbd-bg;\n @include border-radius($border-radius-sm);\n\n kbd {\n padding: 0;\n @include font-size(1em);\n font-weight: $nested-kbd-font-weight;\n }\n}\n\n\n// Figures\n//\n// Apply a consistent margin strategy (matches our type styles).\n\nfigure {\n margin: 0 0 1rem;\n}\n\n\n// Images and content\n\nimg,\nsvg {\n vertical-align: middle;\n}\n\n\n// Tables\n//\n// Prevent double borders\n\ntable {\n caption-side: bottom;\n border-collapse: collapse;\n}\n\ncaption {\n padding-top: $table-cell-padding-y;\n padding-bottom: $table-cell-padding-y;\n color: $table-caption-color;\n text-align: left;\n}\n\n// 1. Removes font-weight bold by inheriting\n// 2. Matches default `
` alignment by inheriting `text-align`.\n// 3. Fix alignment for Safari\n\nth {\n font-weight: $table-th-font-weight; // 1\n text-align: inherit; // 2\n text-align: -webkit-match-parent; // 3\n}\n\nthead,\ntbody,\ntfoot,\ntr,\ntd,\nth {\n border-color: inherit;\n border-style: solid;\n border-width: 0;\n}\n\n\n// Forms\n//\n// 1. Allow labels to use `margin` for spacing.\n\nlabel {\n display: inline-block; // 1\n}\n\n// Remove the default `border-radius` that macOS Chrome adds.\n// See https://github.com/twbs/bootstrap/issues/24093\n\nbutton {\n // stylelint-disable-next-line property-disallowed-list\n border-radius: 0;\n}\n\n// Work around a Firefox bug where the transparent `button` background\n// results in a loss of the default `button` focus styles.\n// Credit https://github.com/suitcss/base/\n\nbutton:focus {\n outline: dotted 1px;\n outline: -webkit-focus-ring-color auto 5px;\n}\n\n// 1. Remove the margin in Firefox and Safari\n\ninput,\nbutton,\nselect,\noptgroup,\ntextarea {\n margin: 0; // 1\n font-family: inherit;\n @include font-size(inherit);\n line-height: inherit;\n}\n\n// Remove the inheritance of text transform in Firefox\n\nbutton,\nselect {\n text-transform: none;\n}\n\n// Set the cursor for non-`