Skip to content

Commit 85cadac

Browse files
authored
chore(docs): fix some heading levels and remove necessary blockquote sections that are not the lead in paragraph (#3081)
1 parent ee6c268 commit 85cadac

File tree

3 files changed

+77
-59
lines changed

3 files changed

+77
-59
lines changed

docs/markdown/intro/README.md

Lines changed: 59 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<code>{{ bootstrapVersion }}</code> SCSS/CSS
99
- jQuery is **not** required
1010

11-
## General
11+
## Using module bundlers
1212

1313
If you are using module bundlers like [webpack](https://webpack.js.org/),
1414
[rollup.js](https://rollupjs.org), etc you may prefer to directly include the package into your
@@ -257,7 +257,43 @@ For additional configuration for Vue CLI 3 for using project relative paths for
257257
various BootstrapVue components, refer to the Vue CLI 3 section of the
258258
[Image Src Resolving](/docs/reference/images#vue-cli-3-support) reference page.
259259

260-
## Individual components and directives
260+
## Selective component and directive inclusion in module bundlers
261+
262+
When using a module bundler you can optionally import only specific components groups, components
263+
and/or directives.
264+
265+
### Component groups and Directives as Vue plugins
266+
267+
You can import component groups and directives as Vue plugins by importing the component group
268+
or directive directory:
269+
270+
<!-- eslint-disable import/first, import/no-duplicates -->
271+
272+
```js
273+
// This imports all the layout components such as <b-container>, <b-row>, <b-col>:
274+
import { Layout } from 'bootstrap-vue/es/components'
275+
Vue.use(Layout)
276+
277+
// This imports <b-modal> as well as the v-b-modal directive as a plugin:
278+
import { Modal } from 'bootstrap-vue/es/components'
279+
Vue.use(Modal)
280+
281+
// This imports <b-card> along with all the <b-card-*> sub-components as a plugin:
282+
import { Card } from 'bootstrap-vue/es/components'
283+
Vue.use(Card)
284+
285+
// This imports directive v-b-scrollspy as a plugin:
286+
import { Scrollspy } from 'bootstrap-vue/es/directives'
287+
Vue.use(Scrollspy)
288+
```
289+
290+
When importing as plugins, all subcomponents and related directives are imported in most cases. i.e.
291+
When importing `<b-nav>`, all the `<nav-*>` sub components are also included, as well all dropdown
292+
sub components. Component shorthand aliases (if any) are also included in the plugin.
293+
294+
Refer to the component and directive documentation for details.
295+
296+
### Individual components and directives
261297

262298
If you would like to only pull in a specific component or set of components, you can do this by
263299
directly importing those components.
@@ -299,37 +335,6 @@ Vue.directive('b-modal', BModalDirective)
299335
Vue and ES2015 allow for various syntaxes here, so feel free to utilize kebab-casing (shown),
300336
camelCasing, PascalCasing, and/or object property shorthand.
301337

302-
### Component groups and Directives as Vue plugins
303-
304-
You can also import component groups and directives as Vue plugins by importing the component group
305-
or directive directory:
306-
307-
<!-- eslint-disable import/first, import/no-duplicates -->
308-
309-
```js
310-
// This imports all the layout components such as <b-container>, <b-row>, <b-col>:
311-
import { Layout } from 'bootstrap-vue/es/components'
312-
Vue.use(Layout)
313-
314-
// This imports <b-modal> as well as the v-b-modal directive as a plugin:
315-
import { Modal } from 'bootstrap-vue/es/components'
316-
Vue.use(Modal)
317-
318-
// This imports <b-card> along with all the <b-card-*> sub-components as a plugin:
319-
import { Card } from 'bootstrap-vue/es/components'
320-
Vue.use(Card)
321-
322-
// This imports directive v-b-scrollspy as a plugin:
323-
import { Scrollspy } from 'bootstrap-vue/es/directives'
324-
Vue.use(Scrollspy)
325-
```
326-
327-
When importing as plugins, all subcomponents and related directives are imported in most cases. i.e.
328-
When importing `<b-nav>`, all the `<nav-*>` sub components are also included, as well all dropdown
329-
sub components. Component shorthand aliases (if any) are also included in the plugin.
330-
331-
Refer to the component and directive documentation for details.
332-
333338
### webpack + Babel
334339

335340
When importing components/directives individually, you must configure your app to properly build the
@@ -363,16 +368,28 @@ module.exports = {
363368

364369
## Browser
365370

371+
Add the Boostrap and BootstrapVue CSS URLs in your HTML `<head>` section, followed by the
372+
required JavaScript files.
373+
374+
When supporting older browsers (see [Browser Support](#browser-support) below), you will need
375+
to include a polyfill for handling modern JavaScript features before loading Vue and
376+
BoostrapVue JavaScript files.
377+
366378
```html
367379
<!-- Add this to <head> -->
380+
381+
<!-- Load required Bootstrap and BootstrapVue CSS -->
368382
<link type="text/css" rel="stylesheet" href="//unpkg.com/bootstrap/dist/css/bootstrap.min.css" />
369383
<link
370384
type="text/css"
371385
rel="stylesheet"
372386
href="//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.min.css"
373387
/>
374388

389+
<!-- Load a polyfill to support older browsers -->
375390
<script src="//unpkg.com/@babel/polyfill@latest/dist/polyfill.min.js"></script>
391+
392+
<!-- Load Vue followed by BootstrapVue -->
376393
<script src="//unpkg.com/vue@latest/dist/vue.min.js"></script>
377394
<script src="//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.min.js"></script>
378395
```
@@ -384,11 +401,15 @@ bundler supports es modules, it will automatically prefer it over commonjs.
384401

385402
| Variant | Environments | Package path |
386403
| -------------- | --------------------- | ---------------------------------------------------------------------- |
387-
| **ES Module** | webpack 2 / rollup.js | `es/index.js` |
404+
| **ES Modules** | webpack 2 / rollup.js | `es/index.js` |
388405
| **ESM Module** | webpack 2 / rollup.js | `dist/bootstrap-vue.esm.js` _or_ `dist/bootstrap-vue.esm.min.js` |
389406
| commonjs2 | webpack 1 / ... | `dist/bootstrap-vue.common.js` _or_ `dist/bootstrap-vue.common.min.js` |
390407
| UMD | Browser | `dist/bootstrap-vue.js` _or_ `dist/bootstrap-vue.min.js` |
391408

409+
BootstrapVue relies on `Popper.js` (for Tooltip, Popover, and Dropdown positioning), and
410+
`vue-functional-data-merge` (for functional components). These two dependencies are included in
411+
the `commonjs2` and `UMD` bundles.
412+
392413
## Migrating a project already using Bootstrap
393414

394415
If you've already been using Bootstrap 4, there are a couple adjustments you may need to make to
@@ -403,7 +424,7 @@ your project:
403424

404425
### CSS
405426

406-
BootstrapVue is to be used with Bootstrap 4 CSS/SCSS. Please see
427+
BootstrapVue is to be used with Bootstrap 4.3 CSS/SCSS. Please see
407428
[Browsers and devices](https://getbootstrap.com/docs/4.3/getting-started/browsers-devices) for more
408429
information about browsers currently supported by Bootstrap 4.
409430

@@ -418,6 +439,9 @@ If you want to support older IE, Android and IOS devices, you may want to use
418439
- `npm install @babel/polyfill`
419440
- Import it in your app main entry point with `import '@babel/polyfill'`
420441

442+
Or use [Polyfill.io](https://polyfill.io/) to dynamically serve browser specific polyfills via `<script>`
443+
tags in the HTML `<head>` section.
444+
421445
## Tooling Support
422446

423447
### VS Code + Vetur

src/components/popover/README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ The target element **must** exist in the document before `<b-popover>` is mounte
3838
element is not found during mount, the popover will never open. Always place your `<b-popover>`
3939
component lower in the DOM than your target element.
4040

41-
> **Note:** _When using slots for content and/or title, `<b-popover>` transfers the rendered DOM
42-
> from those slots into the popover's markup when shown, and returns them back to the `<b-popover>`
43-
> component when hidden. This may cause some issues in rare circumstances, so please test your
44-
> implementation accordingly! The `title` and `content` props do not have this behavior. For simple
45-
> popovers, we recommend using the `v-b-popover` directive and enable the `html` modifier if
46-
> needed._
41+
**Note:** _When using slots for content and/or title, `<b-popover>` transfers the rendered DOM
42+
from those slots into the popover's markup when shown, and returns them back to the `<b-popover>`
43+
component when hidden. This may cause some issues in rare circumstances, so please test your
44+
implementation accordingly! The `title` and `content` props do not have this behavior. For simple
45+
popovers, we recommend using the `v-b-popover` directive and enable the `html` modifier if
46+
needed._
4747

4848
## Positioning
4949

@@ -777,10 +777,8 @@ event.
777777

778778
These events work for both the component **and** directive versions of popover.
779779

780-
> **Note:** _The **trigger element** must exist in the DOM and be in a visible state in order for
781-
> the popover to instantiate and show._
782-
783-
## Disabling and enabling popovers via \$root events
780+
**Note:** _The **trigger element** must exist in the DOM and be in a visible state in order for
781+
the popover to instantiate and show._
784782

785783
### Disabling and enabling popovers via \$root events
786784

@@ -808,8 +806,8 @@ To enable all popovers simultaneously, omit the `id` argument when emitting the
808806

809807
These events work for both the component and directive versions of popover.
810808

811-
> **Note:** _The **trigger element** must exist in the DOM in order for the popover to be enabled or
812-
> disabled._
809+
**Note:** _The **trigger element** must exist in the DOM in order for the popover to be enabled or
810+
disabled._
813811

814812
### Listening to popover changes via \$root events
815813

src/components/tooltip/README.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Things to know when using tooltip component:
2727
white-space: nowrap; on your `<a>`s, `<b-link>`s and `<router-link>`s to avoid this behavior.
2828
- Tooltips must be hidden before their corresponding elements have been removed from the DOM.
2929

30-
The `<b-tooltip` component inserts a hidden (`display:none`) `<div>` intermediate container element
30+
The `<b-tooltip>` component inserts a hidden (`display:none`) `<div>` intermediate container element
3131
at the point in the DOM where the `<b-tooltip>` component is placed. This may affect layout and/or
3232
styling of components such as `<b-button-group>`, `<b-button-toolbar>`, and `<b-input-group>`. To
3333
avoid these possible layout issues, place the `<b-tooltip>` component **outside** of these types of
@@ -291,9 +291,9 @@ long as you have provided the `.sync` prop modifier.
291291
<!-- b-tooltip-disable.vue -->
292292
```
293293

294-
> **Note:** _In the above example, since we are using the default tooltip triggers of `focus hover`,
295-
> the tooltip will close before it is disabled due to loosing focus (and hover) to the toggle
296-
> button._
294+
**Note:** _In the above example, since we are using the default tooltip triggers of `focus hover`,
295+
the tooltip will close before it is disabled due to loosing focus (and hover) to the toggle
296+
button._
297297

298298
You can also emit `$root` events to trigger disabling and enabling of tooltip(s). See the
299299
**Disabling and enabling tooltips via \$root events** section below for details.
@@ -331,8 +331,6 @@ markup:
331331
Refer to the [`v-b-tooltip` documentation](/docs/directives/tooltip) for more information and
332332
features of the directive format.
333333

334-
## Hiding and showing tooltips via \$root events
335-
336334
## 'Global' \$root instance events
337335

338336
Using `$root` instance it is possible to emit and listen events somewhere out of a component, where
@@ -366,10 +364,8 @@ event.
366364

367365
These events work for both the component **and** directive versions of tooltip.
368366

369-
> **Note:** _the **trigger element** must exist in the DOM and be in a visible state in order for
370-
> the tooltip to show._
371-
372-
## Disabling and enabling tooltips via \$root events
367+
**Note:** _the **trigger element** must exist in the DOM and be in a visible state in order for
368+
the tooltip to show._
373369

374370
### Disabling and enabling tooltips via \$root events
375371

@@ -397,8 +393,8 @@ To enable all tooltips simultaneously, omit the `id` argument when emitting the
397393

398394
These events work for both the component **and** directive versions of tooltip.
399395

400-
> **Note:** _The **trigger element** must exist in the DOM in order for the tooltip to be enabled or
401-
> disabled._
396+
**Note:** _The **trigger element** must exist in the DOM in order for the tooltip to be enabled or
397+
disabled._
402398

403399
### Listening to tooltip changes via \$root events
404400

0 commit comments

Comments
 (0)