diff --git a/.browserslistrc b/.browserslistrc index b8e384bc99..c71c8b9c71 100644 --- a/.browserslistrc +++ b/.browserslistrc @@ -5,11 +5,7 @@ last 2 major versions 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 +iOS >= 12 +Safari >= 12 not Explorer <= 11 diff --git a/.bundlewatch.config.json b/.bundlewatch.config.json index 8be4f8c7ab..81badf254c 100644 --- a/.bundlewatch.config.json +++ b/.bundlewatch.config.json @@ -18,23 +18,23 @@ }, { "path": "./dist/css/bootstrap-utilities.css", - "maxSize": "7 kB" + "maxSize": "7.5 kB" }, { "path": "./dist/css/bootstrap-utilities.min.css", - "maxSize": "6.25 kB" + "maxSize": "6.75 kB" }, { "path": "./dist/css/bootstrap.css", - "maxSize": "24 kB" + "maxSize": "24.25 kB" }, { "path": "./dist/css/bootstrap.min.css", - "maxSize": "22 kB" + "maxSize": "22.25 kB" }, { "path": "./dist/js/bootstrap.bundle.js", - "maxSize": "50 kB" + "maxSize": "41.25 kB" }, { "path": "./dist/js/bootstrap.bundle.min.js", @@ -46,11 +46,11 @@ }, { "path": "./dist/js/bootstrap.esm.min.js", - "maxSize": "18 kB" + "maxSize": "18.25 kB" }, { "path": "./dist/js/bootstrap.js", - "maxSize": "28 kB" + "maxSize": "27.25 kB" }, { "path": "./dist/js/bootstrap.min.js", diff --git a/.eslintignore b/.eslintignore index ae6baae7e1..a18b03a5df 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,6 +1,6 @@ **/*.min.js **/dist/ **/vendor/ -/_gh_pages/ +/_site/ /js/coverage/ /site/static/sw.js diff --git a/.eslintrc.json b/.eslintrc.json index ec6aa589c3..049c736673 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -36,24 +36,23 @@ "error", "always" ], - "prefer-named-capture-group": "off", "semi": [ "error", "never" ], "unicorn/consistent-function-scoping": "off", "unicorn/explicit-length-check": "off", - "unicorn/import-index": "off", - "unicorn/no-fn-reference-in-iterator": "off", + "unicorn/no-array-callback-reference": "off", + "unicorn/no-array-for-each": "off", "unicorn/no-for-loop": "off", "unicorn/no-null": "off", "unicorn/no-unused-properties": "error", "unicorn/no-useless-undefined": "off", - "unicorn/prefer-dataset": "off", - "unicorn/prefer-node-append": "off", - "unicorn/prefer-node-remove": "off", - "unicorn/prefer-optional-catch-binding": "off", + "unicorn/prefer-dom-node-append": "off", + "unicorn/prefer-dom-node-dataset": "off", + "unicorn/prefer-dom-node-remove": "off", "unicorn/prefer-query-selector": "off", + "unicorn/prefer-spread": "off", "unicorn/prevent-abbreviations": "off" } } diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 0913b5b5be..32b30cdb3e 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -101,12 +101,12 @@ Example: Sometimes bugs reported to us are actually caused by bugs in the browser(s) themselves, not bugs in Bootstrap per se. -| Vendor(s) | Browser(s) | Rendering engine | Bug reporting website(s) | Notes | -| ------------- | ---------------------------- | ---------------- | --------------------------------------------------------------------- | -------------------------------------------------------- | -| Mozilla | Firefox | Gecko | https://bugzilla.mozilla.org/enter_bug.cgi | "Core" is normally the right product option to choose. | -| Apple | Safari | WebKit | https://bugs.webkit.org/enter_bug.cgi?product=WebKit | In Apple's bug reporter, choose "Safari" as the product. | -| Google, Opera | Chrome, Chromium, Opera v15+ | Blink | https://bugs.chromium.org/p/chromium/issues/list | Click the "New issue" button. | -| Microsoft | Edge | Blink | https://developer.microsoft.com/en-us/microsoft-edge/ | Go to "Help > Send Feedback" from the browser | +| Vendor(s) | Browser(s) | Rendering engine | Bug reporting website(s) | Notes | +| ------------- | ---------------------------- | ---------------- | ------------------------------------------------------ | -------------------------------------------------------- | +| Mozilla | Firefox | Gecko | https://bugzilla.mozilla.org/enter_bug.cgi | "Core" is normally the right product option to choose. | +| Apple | Safari | WebKit | https://bugs.webkit.org/enter_bug.cgi?product=WebKit | In Apple's bug reporter, choose "Safari" as the product. | +| Google, Opera | Chrome, Chromium, Opera v15+ | Blink | https://bugs.chromium.org/p/chromium/issues/list | Click the "New issue" button. | +| Microsoft | Edge | Blink | https://developer.microsoft.com/en-us/microsoft-edge/ | Go to "Help > Send Feedback" from the browser | ## Feature requests @@ -134,9 +134,9 @@ Please adhere to the [coding guidelines](#code-guidelines) used throughout the project (indentation, accurate comments, etc.) and any other requirements (such as test coverage). -**Do not edit `bootstrap.css`, or `bootstrap.js` -directly!** Those files are automatically generated. You should edit the -source files in [`/bootstrap/scss/`](https://github.com/twbs/bootstrap/tree/main/scss) +**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. Similarly, when contributing to Bootstrap's documentation, you should edit the diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 31976021e8..29135b4007 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -15,3 +15,10 @@ updates: - 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 index ae1367c892..e2b70e03ef 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -4,6 +4,9 @@ prerelease: true exclude-labels: - 'skip-changelog' categories: + - title: '❗ Breaking Changes' + labels: + - 'breaking-change' - title: '🚀 Features' labels: - 'new-feature' @@ -14,6 +17,9 @@ categories: - 'fix' - 'bugfix' - 'bug' + - title: '⚡ Performance Improvements' + labels: + - 'performance' - title: '🎨 CSS' labels: - 'css' @@ -26,11 +32,19 @@ categories: - 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' diff --git a/.github/workflows/browserstack.yml b/.github/workflows/browserstack.yml index 0b4cfbdaac..bdbc160897 100644 --- a/.github/workflows/browserstack.yml +++ b/.github/workflows/browserstack.yml @@ -4,21 +4,21 @@ on: push: env: - CI: true FORCE_COLOR: 2 - NODE: 14.x + NODE: 14 jobs: browserstack: runs-on: ubuntu-latest if: github.repository == 'twbs/bootstrap' && (!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')) + timeout-minutes: 30 steps: - name: Clone repository uses: actions/checkout@v2 - name: Set up Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: "${{ env.NODE }}" @@ -26,10 +26,9 @@ jobs: uses: actions/cache@v2 with: path: ~/.npm - key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} + key: ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} restore-keys: | - ${{ runner.OS }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} - ${{ runner.OS }}-node-v${{ env.NODE }}- + ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} - name: Install npm dependencies run: npm ci diff --git a/.github/workflows/bundlewatch.yml b/.github/workflows/bundlewatch.yml index 966dfbf721..b2b1fa1093 100644 --- a/.github/workflows/bundlewatch.yml +++ b/.github/workflows/bundlewatch.yml @@ -2,14 +2,11 @@ name: Bundlewatch on: push: - branches-ignore: - - "dependabot/**" pull_request: env: - CI: true FORCE_COLOR: 2 - NODE: 14.x + NODE: 14 jobs: bundlewatch: @@ -20,7 +17,7 @@ jobs: uses: actions/checkout@v2 - name: Set up Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: "${{ env.NODE }}" @@ -28,10 +25,9 @@ jobs: uses: actions/cache@v2 with: path: ~/.npm - key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} + key: ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} restore-keys: | - ${{ runner.OS }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} - ${{ runner.OS }}-node-v${{ env.NODE }}- + ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} - name: Install npm dependencies run: npm ci diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index f9dccfce03..13e2eb598f 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -11,6 +11,7 @@ on: branches: - main - v4-dev + - "!dependabot/**" schedule: - cron: "0 2 * * 5" @@ -22,15 +23,6 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/css.yml b/.github/workflows/css.yml index a75f018c5e..1f394c65ef 100644 --- a/.github/workflows/css.yml +++ b/.github/workflows/css.yml @@ -7,9 +7,8 @@ on: pull_request: env: - CI: true FORCE_COLOR: 2 - NODE: 14.x + NODE: 14 jobs: css: @@ -20,7 +19,7 @@ jobs: uses: actions/checkout@v2 - name: Set up Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: "${{ env.NODE }}" @@ -28,10 +27,9 @@ jobs: uses: actions/cache@v2 with: path: ~/.npm - key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} + key: ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} restore-keys: | - ${{ runner.OS }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} - ${{ runner.OS }}-node-v${{ env.NODE }}- + ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} - name: Install npm dependencies run: npm ci diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 58b55fc7ca..badaad744f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -7,9 +7,8 @@ on: pull_request: env: - CI: true FORCE_COLOR: 2 - NODE: 14.x + NODE: 14 jobs: docs: @@ -20,7 +19,7 @@ jobs: uses: actions/checkout@v2 - name: Set up Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: "${{ env.NODE }}" @@ -30,10 +29,9 @@ jobs: uses: actions/cache@v2 with: path: ~/.npm - key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} + key: ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} restore-keys: | - ${{ runner.OS }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} - ${{ runner.OS }}-node-v${{ env.NODE }}- + ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} - name: Install npm dependencies run: npm ci diff --git a/.github/workflows/js.yml b/.github/workflows/js.yml index 1ec0d69098..9a2d92f941 100644 --- a/.github/workflows/js.yml +++ b/.github/workflows/js.yml @@ -7,7 +7,6 @@ on: pull_request: env: - CI: true FORCE_COLOR: 2 jobs: @@ -18,14 +17,14 @@ jobs: strategy: fail-fast: false matrix: - node: [10, 12, 14] + node: [10, 12, 14, 16] steps: - name: Clone repository uses: actions/checkout@v2 - name: Set up Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: ${{ matrix.node }} @@ -33,10 +32,9 @@ jobs: uses: actions/cache@v2 with: path: ~/.npm - key: ${{ runner.os }}-node-v${{ matrix.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}} + key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} restore-keys: | - ${{ runner.OS }}-node-v${{ matrix.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} - ${{ runner.OS }}-node-v${{ matrix.node }}- + ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} - name: Install npm dependencies run: npm ci @@ -48,7 +46,7 @@ jobs: run: npm run js-test - name: Run Coveralls - uses: coverallsapp/github-action@master + uses: coverallsapp/github-action@v1.1.2 if: matrix.node == 14 with: github-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e850a1f1b8..f4c288ec78 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,9 +7,8 @@ on: pull_request: env: - CI: true FORCE_COLOR: 2 - NODE: 14.x + NODE: 14 jobs: lint: @@ -20,7 +19,7 @@ jobs: uses: actions/checkout@v2 - name: Set up Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: "${{ env.NODE }}" @@ -28,10 +27,9 @@ jobs: uses: actions/cache@v2 with: path: ~/.npm - key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} + key: ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} restore-keys: | - ${{ runner.OS }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} - ${{ runner.OS }}-node-v${{ env.NODE }}- + ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} - name: Install npm dependencies run: npm ci diff --git a/.github/workflows/node-sass.yml b/.github/workflows/node-sass.yml index 2db55f0ff9..ee64b21527 100644 --- a/.github/workflows/node-sass.yml +++ b/.github/workflows/node-sass.yml @@ -7,9 +7,8 @@ on: pull_request: env: - CI: true FORCE_COLOR: 2 - NODE: 14.x + NODE: 14 jobs: css: @@ -20,7 +19,7 @@ jobs: uses: actions/checkout@v2 - name: Set up Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: "${{ env.NODE }}" diff --git a/.github/workflows/release-notes.yml b/.github/workflows/release-notes.yml index 1c4f4be9b8..ab2f37694d 100644 --- a/.github/workflows/release-notes.yml +++ b/.github/workflows/release-notes.yml @@ -8,6 +8,7 @@ on: jobs: update_release_draft: runs-on: ubuntu-latest + if: github.repository == 'twbs/bootstrap' steps: - uses: release-drafter/release-drafter@v5 env: diff --git a/.gitignore b/.gitignore index 6208c57d70..9817c71118 100644 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,8 @@ # Ignore docs files -/_gh_pages/ -# This is the old Jekyll docs dist folder; -# keeping it here so that when we switch branches it doesn't show up -/site/docs/**/dist/ -# Jekyll's cache folder; keeping it for the same reason as above -/site/.jekyll-cache/ +/_site/ # Hugo resources folder /resources/ -# Ignore ruby/bundler files; -# keeping them here so that when we switch branches they don't show up -/.bundle/ -/vendor/ -/.ruby-version - # Numerous always-ignore extensions *.diff *.err diff --git a/.stylelintignore b/.stylelintignore index e42e889384..0759a69ace 100644 --- a/.stylelintignore +++ b/.stylelintignore @@ -1,5 +1,5 @@ **/*.min.css **/dist/ **/vendor/ -/_gh_pages/ +/_site/ /js/coverage/ diff --git a/.stylelintrc b/.stylelintrc index 1c9ee18116..c068d30b57 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -3,6 +3,10 @@ "stylelint-config-twbs-bootstrap/scss" ], "rules": { + "declaration-property-value-disallowed-list": { + "border": "none", + "outline": "none" + }, "function-disallowed-list": [ "calc", "lighten", diff --git a/LICENSE b/LICENSE index 173a9ebbbd..72dda234ed 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ The MIT License (MIT) -Copyright (c) 2011-2020 Twitter, Inc. -Copyright (c) 2011-2020 The Bootstrap Authors +Copyright (c) 2011-2021 Twitter, Inc. +Copyright (c) 2011-2021 The Bootstrap Authors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index b89ccc55d0..6d87cec6ff 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@
@@ -9,7 +9,7 @@
Sleek, intuitive, and powerful front-end framework for faster and easier web development.
- Explore Bootstrap docs »
+ Explore Bootstrap docs »
Report bug
@@ -46,20 +46,20 @@ Our default branch is for development of our upcoming Bootstrap 5 release. Head
Several quick start options are available:
-- [Download the latest release](https://github.com/twbs/bootstrap/archive/v5.0.0-alpha3.zip)
+- [Download the latest release](https://github.com/twbs/bootstrap/archive/v5.0.0-beta3.zip)
- Clone the repo: `git clone https://github.com/twbs/bootstrap.git`
- Install with [npm](https://www.npmjs.com/): `npm install bootstrap@next`
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@next`
-- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:5.0.0-alpha3`
+- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:5.0.0-beta3`
- Install with [NuGet](https://www.nuget.org/): CSS: `Install-Package bootstrap` Sass: `Install-Package bootstrap.sass`
-Read the [Getting started page](https://v5.getbootstrap.com/docs/5.0/getting-started/introduction/) for information on the framework contents, templates and examples, and more.
+Read the [Getting started page](https://getbootstrap.com/docs/5.0/getting-started/introduction/) for information on the framework contents, templates and examples, and more.
## Status
[](https://bootstrap-slack.herokuapp.com/)
-[](https://github.com/twbs/bootstrap/actions?query=workflow%3AJS+Tests+branch%3Amain)
+[](https://github.com/twbs/bootstrap/actions?query=workflow%3AJS+Tests+branch%3Amain)
[](https://www.npmjs.com/package/bootstrap)
[](https://rubygems.org/gems/bootstrap)
[](https://atmospherejs.com/twbs/bootstrap)
@@ -141,7 +141,7 @@ Have a bug or a feature request? Please first read the [issue guidelines](https:
## Documentation
-Bootstrap's documentation, included in this repo in the root directory, is built with [Hugo](https://gohugo.io/) and publicly hosted on GitHub Pages at
`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 `