aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/twbs/bootstrap/site/content/docs/5.2/getting-started')
-rw-r--r--vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/best-practices.md2
-rw-r--r--vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/browsers-devices.md2
-rw-r--r--vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/contents.md16
-rw-r--r--vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/download.md2
-rw-r--r--vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/introduction.md6
-rw-r--r--vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/javascript.md4
-rw-r--r--vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/parcel.md1
-rw-r--r--vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/rtl.md2
-rw-r--r--vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/vite.md3
-rw-r--r--vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/webpack.md90
10 files changed, 110 insertions, 18 deletions
diff --git a/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/best-practices.md b/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/best-practices.md
index e17fc1290..449d02a85 100644
--- a/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/best-practices.md
+++ b/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/best-practices.md
@@ -17,4 +17,4 @@ We've designed and developed Bootstrap to work in a number of environments. Here
- Working with Sass files
- Building new CSS components
- Working with flexbox
-- Ask in [Slack](https://bootstrap-slack.herokuapp.com/)
+- Ask in [our GitHub Discussions](https://github.com/twbs/bootstrap/discussions)
diff --git a/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/browsers-devices.md b/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/browsers-devices.md
index 41885feaa..dc550ecb9 100644
--- a/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/browsers-devices.md
+++ b/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/browsers-devices.md
@@ -30,7 +30,7 @@ Generally speaking, Bootstrap supports the latest versions of each major platfor
| | Chrome | Firefox | Safari | Android Browser & WebView |
| --- | --- | --- | --- | --- |
| **Android** | Supported | Supported | <span class="text-muted">&mdash;</span> | v6.0+ |
-| **Windows** | Supported | Supported | Supported | <span class="text-muted">&mdash;</span> |
+| **iOS** | Supported | Supported | Supported | <span class="text-muted">&mdash;</span> |
{{< /bs-table >}}
### Desktop browsers
diff --git a/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/contents.md b/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/contents.md
index a83b65ee3..88632b6d5 100644
--- a/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/contents.md
+++ b/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/contents.md
@@ -1,12 +1,12 @@
---
layout: docs
title: Contents
-description: Discover what's included in Bootstrap, including our precompiled and source code flavors.
+description: Discover what's included in Bootstrap, including our compiled and source code flavors.
group: getting-started
toc: true
---
-## Precompiled Bootstrap
+## Compiled Bootstrap
Once downloaded, unzip the compressed folder and you'll see something like this:
@@ -62,9 +62,9 @@ bootstrap/
└── bootstrap.min.js.map
```
-This is the most basic form of Bootstrap: precompiled files for quick drop-in usage in nearly any web project. We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). [Source maps](https://developers.google.com/web/tools/chrome-devtools/javascript/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Popper](https://popper.js.org/).
+This is the most basic form of Bootstrap: compiled files for quick drop-in usage in nearly any web project. We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). [Source maps](https://developers.google.com/web/tools/chrome-devtools/javascript/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Popper](https://popper.js.org/).
-## CSS files
+### CSS files
Bootstrap includes a handful of options for including some or all of our compiled CSS.
@@ -77,7 +77,7 @@ Bootstrap includes a handful of options for including some or all of our compile
| `bootstrap-reboot.css`<br> `bootstrap-reboot.rtl.css`<br> `bootstrap-reboot.min.css`<br> `bootstrap-reboot.rtl.min.css` | — | [Only Reboot]({{< docsref "/content/reboot" >}}) | — | — |
{{< /bs-table >}}
-## JS files
+### JS files
Similarly, we have options for including some or all of our compiled JavaScript.
@@ -90,7 +90,7 @@ Similarly, we have options for including some or all of our compiled JavaScript.
## Bootstrap source code
-The Bootstrap source code download includes the precompiled CSS and JavaScript assets, along with source Sass, JavaScript, and documentation. More specifically, it includes the following and more:
+The Bootstrap source code download includes the compiled CSS and JavaScript assets, along with source Sass, JavaScript, and documentation. More specifically, it includes the following and more:
```text
bootstrap/
@@ -106,4 +106,6 @@ bootstrap/
└── scss/
```
-The `scss/` and `js/` are the source code for our CSS and JavaScript. The `dist/` folder includes everything listed in the precompiled download section above. The `site/docs/` folder includes the source code for our documentation, and `examples/` of Bootstrap usage. Beyond that, any other included file provides support for packages, license information, and development.
+The `scss/` and `js/` are the source code for our CSS and JavaScript. The `dist/` folder includes everything listed in the compiled download section above. The `site/content/docs/` folder includes the source code for our hosted documentation, including our live examples of Bootstrap usage.
+
+Beyond that, any other included file provides support for packages, license information, and development.
diff --git a/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/download.md b/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/download.md
index eeffdc83e..b06c0559a 100644
--- a/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/download.md
+++ b/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/download.md
@@ -68,7 +68,7 @@ The `bootstrap` module itself exports all of our plugins. You can manually load
Bootstrap's `package.json` contains some additional metadata under the following keys:
- `sass` - path to Bootstrap's main [Sass](https://sass-lang.com/) source file
-- `style` - path to Bootstrap's non-minified CSS that's been precompiled using the default settings (no customization)
+- `style` - path to Bootstrap's non-minified CSS that's been compiled using the default settings (no customization)
{{< callout info >}}
{{< partial "callout-info-npm-starter.md" >}}
diff --git a/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/introduction.md b/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/introduction.md
index 4eaf5d6f8..f0072bf85 100644
--- a/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/introduction.md
+++ b/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/introduction.md
@@ -76,7 +76,7 @@ You can also use the CDN to fetch any of our [additional builds listed in the Co
- Read a bit more about some [important global environment settings](#important-globals) that Bootstrap utilizes.
-- Read about what's included in Bootstrap in our [contents section]({{< docsref "/getting-started/contents#precompiled-bootstrap" >}}) and the list of [components that require JavaScript](#js-components) below.
+- Read about what's included in Bootstrap in our [contents section]({{< docsref "/getting-started/contents/" >}}) and the list of [components that require JavaScript](#js-components) below.
- Need a little more power? Consider building with Bootstrap by [including the source files via package manager]({{< docsref "/getting-started/download#package-managers" >}}).
@@ -151,10 +151,10 @@ For improved cross-browser rendering, we use [Reboot]({{< docsref "/content/rebo
## Community
-Stay up to date on the development of Bootstrap and reach out to the community with these helpful resources.
+Stay up-to-date on the development of Bootstrap and reach out to the community with these helpful resources.
- Read and subscribe to [The Official Bootstrap Blog]({{< param blog >}}).
-- Join [the official Slack room]({{< param slack >}}).
+- Ask and explore [our GitHub Discussions](https://github.com/twbs/bootstrap/discussions).
- Chat with fellow Bootstrappers in IRC. On the `irc.libera.chat` server, in the `#bootstrap` channel.
- Implementation help may be found at Stack Overflow (tagged [`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5)).
- Developers should use the keyword `bootstrap` on packages that modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/search?q=keywords:bootstrap) or similar delivery mechanisms for maximum discoverability.
diff --git a/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/javascript.md b/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/javascript.md
index fa157e006..c4ba6b0f7 100644
--- a/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/javascript.md
+++ b/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/javascript.md
@@ -222,8 +222,8 @@ Every Bootstrap plugin exposes the following methods and static properties.
{{< bs-table "table" >}}
| Static property | Description |
| --- | --- |
-| `NAME` | Returns the plugin name. (Example: `bootstrap.Tooltip.NAME`) |
-| `VERSION` | The version of each of Bootstrap's plugins can be accessed via the `VERSION` property of the plugin's constructor (Example: `bootstrap.Tooltip.VERSION`) |
+| `NAME` | Returns the plugin name. (Example: `bootstrap.Tooltip.NAME`) |
+| `VERSION` | The version of each of Bootstrap's plugins can be accessed via the `VERSION` property of the plugin's constructor (Example: `bootstrap.Tooltip.VERSION`) |
{{< /bs-table >}}
## Sanitizer
diff --git a/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/parcel.md b/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/parcel.md
index 674a39837..d28f92384 100644
--- a/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/parcel.md
+++ b/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/parcel.md
@@ -4,6 +4,7 @@ title: "Bootstrap & Parcel"
description: The official guide for how to include and bundle Bootstrap's CSS and JavaScript in your project using Parcel.
group: getting-started
toc: true
+thumbnail: guides/bootstrap-parcel@2x.png
---
<img class="mb-4 img-fluid rounded-3" srcset="/docs/{{< param docs_version >}}/assets/img/guides/bootstrap-parcel.png, /docs/{{< param docs_version >}}/assets/img/guides/bootstrap-parcel@2x.png 2x" src="/docs/{{< param docs_version >}}/assets/img/guides/bootstrap-parcel.png" width="2000" height="1000" alt="">
diff --git a/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/rtl.md b/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/rtl.md
index 19d33ffb4..f4abf050b 100644
--- a/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/rtl.md
+++ b/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/rtl.md
@@ -15,7 +15,7 @@ You may also want to read up on [the RTLCSS project](https://rtlcss.com/), as it
{{< callout warning >}}
### Experimental feature
-The RTL feature is still **experimental** and will probably evolve according to user feedback. Spotted something or have an improvement to suggest? [Open an issue]({{< param repo >}}/issues/new), we'd love to get your insights.
+The RTL feature is still **experimental** and will probably evolve according to user feedback. Spotted something or have an improvement to suggest? [Open an issue]({{< param repo >}}/issues/new/choose), we'd love to get your insights.
{{< /callout >}}
## Required HTML
diff --git a/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/vite.md b/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/vite.md
index ca71bbe31..b203eef8a 100644
--- a/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/vite.md
+++ b/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/vite.md
@@ -4,6 +4,7 @@ title: "Bootstrap & Vite"
description: The official guide for how to include and bundle Bootstrap's CSS and JavaScript in your project using Vite.
group: getting-started
toc: true
+thumbnail: guides/bootstrap-vite@2x.png
---
<img class="mb-4 img-fluid rounded-3" srcset="/docs/{{< param docs_version >}}/assets/img/guides/bootstrap-vite.png, /docs/{{< param docs_version >}}/assets/img/guides/bootstrap-vite@2x.png 2x" src="/docs/{{< param docs_version >}}/assets/img/guides/bootstrap-vite.png" width="2000" height="1000" alt="">
@@ -72,7 +73,7 @@ At this point, everything is in the right place, but Vite won't work because we
With dependencies installed and our project folder ready for us to start coding, we can now configure Vite and run our project locally.
-1. **Open `vite.config.js` in your editor.** Since it's blank, we'll need to add some boilerplate config to it so we can start our server. This part of the config tells Vite were to look for our project's JavaScript and how the development server should behave (pulling from the `src` folder with hot reload).
+1. **Open `vite.config.js` in your editor.** Since it's blank, we'll need to add some boilerplate config to it so we can start our server. This part of the config tells Vite where to look for our project's JavaScript and how the development server should behave (pulling from the `src` folder with hot reload).
<!-- eslint-skip -->
```js
diff --git a/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/webpack.md b/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/webpack.md
index e314ecf6a..870e070e3 100644
--- a/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/webpack.md
+++ b/vendor/twbs/bootstrap/site/content/docs/5.2/getting-started/webpack.md
@@ -4,6 +4,7 @@ title: "Bootstrap & Webpack"
description: The official guide for how to include and bundle Bootstrap's CSS and JavaScript in your project using Webpack.
group: getting-started
toc: true
+thumbnail: guides/bootstrap-webpack@2x.png
---
<img class="mb-4 img-fluid rounded-3" srcset="/docs/{{< param docs_version >}}/assets/img/guides/bootstrap-webpack.png, /docs/{{< param docs_version >}}/assets/img/guides/bootstrap-webpack@2x.png 2x" src="/docs/{{< param docs_version >}}/assets/img/guides/bootstrap-webpack.png" width="2000" height="1000" alt="">
@@ -74,7 +75,7 @@ At this point, everything is in the right place, but Webpack won't work because
With dependencies installed and our project folder ready for us to start coding, we can now configure Webpack and run our project locally.
-1. **Open `webpack.config.js` in your editor.** Since it's blank, we'll need to add some boilerplate config to it so we can start our server. This part of the config tells Webpack were to look for our project's JavaScript, where to output the compiled code to (`dist`), and how the development server should behave (pulling from the `dist` folder with hot reload).
+1. **Open `webpack.config.js` in your editor.** Since it's blank, we'll need to add some boilerplate config to it so we can start our server. This part of the config tells Webpack where to look for our project's JavaScript, where to output the compiled code to (`dist`), and how the development server should behave (pulling from the `dist` folder with hot reload).
```js
const path = require('path')
@@ -229,6 +230,93 @@ Importing Bootstrap into Webpack requires the loaders we installed in the first
Now you can start adding any Bootstrap components you want to use. Be sure to [check out the complete Webpack example project](https://github.com/twbs/examples/tree/main/webpack) for how to include additional custom Sass and optimize your build by importing only the parts of Bootstrap's CSS and JS that you need.
+## Production optimizations
+
+Depending on your setup, you may want to implement some additional security and speed optimizations useful for running the project in production. Note that these optimizations are not applied on [the Webpack example project](https://github.com/twbs/examples/tree/main/webpack) and are up to you to implement.
+
+### Extracting CSS
+
+The `style-loader` we configured above conveniently emits CSS into the bundle so that manually loading a CSS file in `dist/index.html` isn't necessary. This approach may not work with a strict Content Security Policy, however, and it may become a bottleneck in your application due to the large bundle size.
+
+To separate the CSS so that we can load it directly from `dist/index.html`, use the `mini-css-extract-loader` Webpack plugin.
+
+First, install the plugin:
+
+```sh
+npm install --save-dev mini-css-extract-plugin
+```
+
+Then instantiate and use the plugin in the Webpack configuration:
+
+```diff
+--- a/webpack/webpack.config.js
++++ b/webpack/webpack.config.js
+@@ -1,8 +1,10 @@
++const miniCssExtractPlugin = require('mini-css-extract-plugin')
+ const path = require('path')
+
+ module.exports = {
+ mode: 'development',
+ entry: './src/js/main.js',
++ plugins: [new miniCssExtractPlugin()],
+ output: {
+ filename: "main.js",
+ path: path.resolve(__dirname, "dist"),
+@@ -18,8 +20,8 @@ module.exports = {
+ test: /\.(scss)$/,
+ use: [
+ {
+- // Adds CSS to the DOM by injecting a `<style>` tag
+- loader: 'style-loader'
++ // Extracts CSS for each JS file that includes CSS
++ loader: miniCssExtractPlugin.loader
+ },
+ {
+```
+
+After running `npm run build` again, there will be a new file `dist/main.css`, which will contain all of the CSS imported by `src/js/main.js`. If you view `dist/index.html` in your browser now, the style will be missing, as it is now in `dist/main.css`. You can include the generated CSS in `dist/index.html` like this:
+
+```diff
+--- a/webpack/dist/index.html
++++ b/webpack/dist/index.html
+@@ -3,6 +3,7 @@
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
++ <link rel="stylesheet" href="./main.css">
+ <title>Bootstrap w/ Webpack</title>
+ </head>
+ <body>
+```
+
+### Extracting SVG files
+
+Bootstrap's CSS includes multiple references to SVG files via inline `data:` URIs. If you define a Content Security Policy for your project that blocks `data:` URIs for images, then these SVG files will not load. You can get around this problem by extracting the inline SVG files using Webpack's asset modules feature.
+
+Configure Webpack to extract inline SVG files like this:
+
+```diff
+--- a/webpack/webpack.config.js
++++ b/webpack/webpack.config.js
+@@ -16,6 +16,14 @@ module.exports = {
+ },
+ module: {
+ rules: [
++ {
++ mimetype: 'image/svg+xml',
++ scheme: 'data',
++ type: 'asset/resource',
++ generator: {
++ filename: 'icons/[hash].svg'
++ }
++ },
+ {
+ test: /\.(scss)$/,
+ use: [
+```
+
+After running `npm run build` again, you'll find the SVG files extracted into `dist/icons` and properly referenced from CSS.
+
{{< markdown >}}
{{< partial "guide-footer.md" >}}
{{< /markdown >}}