From e6042e6f44aeac4f160660adae2b0d0a8f512c71 Mon Sep 17 00:00:00 2001 From: Patrick Yeo Date: Wed, 28 Jun 2017 12:34:07 -0700 Subject: [PATCH 001/144] Add option to disable carets on dropdowns through `$enable-caret` --- scss/_dropdown.scss | 21 ++------------------- scss/_mixins.scss | 1 + scss/_variables.scss | 1 + scss/mixins/_caret.scss | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 39 insertions(+), 19 deletions(-) create mode 100644 scss/mixins/_caret.scss diff --git a/scss/_dropdown.scss b/scss/_dropdown.scss index 05e8b165232f..9d276f875da7 100644 --- a/scss/_dropdown.scss +++ b/scss/_dropdown.scss @@ -6,21 +6,7 @@ .dropdown-toggle { // Generate the caret automatically - &::after { - display: inline-block; - width: 0; - height: 0; - margin-left: $caret-width * .85; - vertical-align: $caret-width * .85; - content: ""; - border-top: $caret-width solid; - border-right: $caret-width solid transparent; - border-left: $caret-width solid transparent; - } - - &:empty::after { - margin-left: 0; - } + @include caret; } // Allow for dropdowns to go bottom up (aka, dropup-menu) @@ -32,10 +18,7 @@ } .dropdown-toggle { - &::after { - border-top: 0; - border-bottom: $caret-width solid; - } + @include caret(up); } } diff --git a/scss/_mixins.scss b/scss/_mixins.scss index 09035bf10724..d9a1774b7dab 100644 --- a/scss/_mixins.scss +++ b/scss/_mixins.scss @@ -19,6 +19,7 @@ // // Components @import "mixins/alert"; @import "mixins/buttons"; +@import "mixins/caret"; @import "mixins/pagination"; @import "mixins/lists"; @import "mixins/list-group"; diff --git a/scss/_variables.scss b/scss/_variables.scss index e68fb23c833f..71fb384aa5be 100644 --- a/scss/_variables.scss +++ b/scss/_variables.scss @@ -122,6 +122,7 @@ $theme-color-interval: 8% !default; // // Quickly modify global styling by enabling or disabling optional features. +$enable-caret: true !default; $enable-rounded: true !default; $enable-shadows: false !default; $enable-gradients: false !default; diff --git a/scss/mixins/_caret.scss b/scss/mixins/_caret.scss new file mode 100644 index 000000000000..daab9d03c0c5 --- /dev/null +++ b/scss/mixins/_caret.scss @@ -0,0 +1,35 @@ +@mixin caret-down { + border-top: $caret-width solid; + border-right: $caret-width solid transparent; + border-bottom: 0; + border-left: $caret-width solid transparent; +} + +@mixin caret-up { + border-top: 0; + border-right: $caret-width solid transparent; + border-bottom: $caret-width solid; + border-left: $caret-width solid transparent; +} + +@mixin caret($direction: down) { + @if $enable-caret { + &::after { + display: inline-block; + width: 0; + height: 0; + margin-left: $caret-width * .85; + vertical-align: $caret-width * .85; + content: ""; + @if $direction == down { + @include caret-down; + } @else if $direction == up { + @include caret-up; + } + } + + &:empty::after { + margin-left: 0; + } + } +} From ea854233b70a4420d20eaacf507865f395134cae Mon Sep 17 00:00:00 2001 From: Patrick Yeo Date: Mon, 14 Aug 2017 09:28:16 -0700 Subject: [PATCH 002/144] v4 docs Add description for global variable `$enable-caret` --- docs/4.0/getting-started/options.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/4.0/getting-started/options.md b/docs/4.0/getting-started/options.md index 0b83c47f8769..2a9fb5ca8394 100644 --- a/docs/4.0/getting-started/options.md +++ b/docs/4.0/getting-started/options.md @@ -28,6 +28,7 @@ You can find and customize these variables for key global options in our `_varia | Variable | Values | Description | | --------------------------- | ---------------------------------- | -------------------------------------------------------------------------------------- | | `$spacer` | `1rem` (default), or any value > 0 | Specifies the default spacer value to programmatically generate our [spacer utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/spacing/). | +| `$enable-caret` | `true` (default) or `false` | Enables pseudo element caret on `.dropdown-toggle`. | | `$enable-rounded` | `true` (default) or `false` | Enables predefined `border-radius` styles on various components. | | `$enable-shadows` | `true` or `false` (default) | Enables predefined `box-shadow` styles on various components. | | `$enable-gradients` | `true` or `false` (default) | Enables predefined gradients via `background-image` styles on various components. | From 3e546cacb4facdf98a6a18fa7bafe50d48e02c56 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Wed, 13 Sep 2017 20:56:19 +0300 Subject: [PATCH 003/144] Fix missing `.btn` class from `bd-search-docs-toggler`. (#23942) --- _includes/docs-sidebar.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/docs-sidebar.html b/_includes/docs-sidebar.html index 00eaf47a60d7..d23e033b669a 100644 --- a/_includes/docs-sidebar.html +++ b/_includes/docs-sidebar.html @@ -1,6 +1,6 @@ From d1b3c0c98db882cfbf6fbe85a321e83b7eb9c1d1 Mon Sep 17 00:00:00 2001 From: "Patrick H. Lauke" Date: Wed, 13 Sep 2017 19:51:08 +0100 Subject: [PATCH 004/144] Structure examples with appropriate `
`, `
`, `
` Structure examples with appropriate `
`, `
`, `
` --- docs/4.0/examples/album/index.html | 150 +++++----- docs/4.0/examples/blog/index.html | 40 +-- docs/4.0/examples/carousel/index.html | 262 +++++++++--------- docs/4.0/examples/cover/index.html | 12 +- docs/4.0/examples/dashboard/index.html | 56 ++-- docs/4.0/examples/jumbotron/index.html | 64 +++-- docs/4.0/examples/justified-nav/index.html | 52 ++-- docs/4.0/examples/narrow-jumbotron/index.html | 52 ++-- docs/4.0/examples/navbar-top-fixed/index.html | 4 +- docs/4.0/examples/navbar-top/index.html | 4 +- docs/4.0/examples/navbars/index.html | 20 +- docs/4.0/examples/offcanvas/index.html | 10 +- docs/4.0/examples/starter-template/index.html | 4 +- .../examples/sticky-footer-navbar/index.html | 54 ++-- docs/4.0/examples/sticky-footer/index.html | 4 +- 15 files changed, 410 insertions(+), 378 deletions(-) diff --git a/docs/4.0/examples/album/index.html b/docs/4.0/examples/album/index.html index 6723e53fbaa9..ecd3f351762f 100644 --- a/docs/4.0/examples/album/index.html +++ b/docs/4.0/examples/album/index.html @@ -18,90 +18,96 @@ -
-
-
-

Album example

-

Something short and leading about the collection below—its contents, the creator, etc. Make it short and sweet, but not too short so folks don't simply skip over it entirely.

-

- Main call to action - Secondary action -

-
-
+
-
-
+
+
+

Album example

+

Something short and leading about the collection below—its contents, the creator, etc. Make it short and sweet, but not too short so folks don't simply skip over it entirely.

+

+ Main call to action + Secondary action +

+
+
-
-
- Card image cap -

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

-
-
- Card image cap -

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

-
-
- Card image cap -

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

-
+
+
-
- Card image cap -

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

-
-
- Card image cap -

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

-
-
- Card image cap -

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

-
+
+
+ Card image cap +

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

+
+
+ Card image cap +

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

+
+
+ Card image cap +

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

+
-
- Card image cap -

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

-
-
- Card image cap -

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

-
-
- Card image cap -

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

+
+ Card image cap +

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

+
+
+ Card image cap +

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

+
+
+ Card image cap +

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

+
+ +
+ Card image cap +

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

+
+
+ Card image cap +

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

+
+
+ Card image cap +

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

+
-
+
-
+ +
diff --git a/docs/4.0/examples/blog/index.html b/docs/4.0/examples/blog/index.html index a021d7afad0a..4601fd76d6d9 100644 --- a/docs/4.0/examples/blog/index.html +++ b/docs/4.0/examples/blog/index.html @@ -18,26 +18,28 @@ -
-
- +
+
+
-
-
-
-

The Bootstrap Blog

-

An example blog template built with Bootstrap.

+
+
+

The Bootstrap Blog

+

An example blog template built with Bootstrap.

+
-
+
-
+
@@ -109,7 +111,7 @@

New feature

-
+
+
- +