mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-14 18:42:30 +03:00
docs: switch to fenced codeblocks (#31806)
This commit is contained in:
@@ -18,9 +18,9 @@ Looking to quickly add Bootstrap to your project? Use jsDelivr, a free open sour
|
||||
|
||||
Copy-paste the stylesheet `<link>` into your `<head>` before all other stylesheets to load our CSS.
|
||||
|
||||
{{< highlight html >}}
|
||||
```html
|
||||
<link rel="stylesheet" href="{{< param "cdn.css" >}}" integrity="{{< param "cdn.css_hash" >}}" crossorigin="anonymous">
|
||||
{{< /highlight >}}
|
||||
```
|
||||
|
||||
### JS
|
||||
|
||||
@@ -30,18 +30,18 @@ Many of our components require the use of JavaScript to function. Specifically,
|
||||
|
||||
Include everything you need in one script with our bundle. Our `bootstrap.bundle.js` and `bootstrap.bundle.min.js` include [Popper](https://popper.js.org/). For more information about what's included in Bootstrap, please see our [contents]({{< docsref "/getting-started/contents#precompiled-bootstrap" >}}) section.
|
||||
|
||||
{{< highlight html >}}
|
||||
```html
|
||||
<script src="{{< param "cdn.js_bundle" >}}" integrity="{{< param "cdn.js_bundle_hash" >}}" crossorigin="anonymous"></script>
|
||||
{{< /highlight >}}
|
||||
```
|
||||
|
||||
#### Separate
|
||||
|
||||
If you decide to go with the separate scripts solution, Popper.js must come first, and then our JavaScript plugins.
|
||||
|
||||
{{< highlight html >}}
|
||||
```html
|
||||
<script src="{{< param "cdn.popper" >}}" integrity="{{< param "cdn.popper_hash" >}}" crossorigin="anonymous"></script>
|
||||
<script src="{{< param "cdn.js" >}}" integrity="{{< param "cdn.js_hash" >}}" crossorigin="anonymous"></script>
|
||||
{{< /highlight >}}
|
||||
```
|
||||
|
||||
#### Modules
|
||||
|
||||
@@ -57,7 +57,7 @@ Curious which components explicitly require our JavaScript and Popper.js? Click
|
||||
|
||||
Be sure to have your pages set up with the latest design and development standards. That means using an HTML5 doctype and including a viewport meta tag for proper responsive behaviors. Put it all together and your pages should look like this:
|
||||
|
||||
{{< highlight html >}}
|
||||
```html
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
@@ -84,7 +84,7 @@ Be sure to have your pages set up with the latest design and development standar
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
{{< /highlight >}}
|
||||
```
|
||||
|
||||
That's all you need for overall page requirements. Visit the [Layout docs]({{< docsref "/layout/grid" >}}) or [our official examples]({{< docsref "/examples" >}}) to start laying out your site's content and components.
|
||||
|
||||
@@ -96,20 +96,20 @@ Bootstrap employs a handful of important global styles and settings that you'll
|
||||
|
||||
Bootstrap requires the use of the HTML5 doctype. Without it, you'll see some funky incomplete styling, but including it shouldn't cause any considerable hiccups.
|
||||
|
||||
{{< highlight html >}}
|
||||
```html
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
...
|
||||
</html>
|
||||
{{< /highlight >}}
|
||||
```
|
||||
|
||||
### Responsive meta tag
|
||||
|
||||
Bootstrap is developed *mobile first*, a strategy in which we optimize code for mobile devices first and then scale up components as necessary using CSS media queries. To ensure proper rendering and touch zooming for all devices, **add the responsive viewport meta tag** to your `<head>`.
|
||||
|
||||
{{< highlight html >}}
|
||||
```html
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
{{< /highlight >}}
|
||||
```
|
||||
|
||||
You can see an example of this in action in the [starter template](#starter-template).
|
||||
|
||||
@@ -119,11 +119,11 @@ For more straightforward sizing in CSS, we switch the global `box-sizing` value
|
||||
|
||||
On the rare occasion you need to override it, use something like the following:
|
||||
|
||||
{{< highlight css >}}
|
||||
```css
|
||||
.selector-for-some-widget {
|
||||
box-sizing: content-box;
|
||||
}
|
||||
{{< /highlight >}}
|
||||
```
|
||||
|
||||
With the above snippet, nested elements—including generated content via `::before` and `::after`—will all inherit the specified `box-sizing` for that `.selector-for-some-widget`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user