From 1ebb8e7d9b4bd52c7fc088aeaec12ab9bcb240c6 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 2 Aug 2019 17:26:25 +0300 Subject: [PATCH 1/8] robots.txt: adapt for Netlify. (#29192) Since we build with `HUGO_ENV` set to `production` on Netlify, use another variable to prevent crawling. --- site/layouts/robots.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/site/layouts/robots.txt b/site/layouts/robots.txt index e9d78f1aeddc..c6703cd06c89 100644 --- a/site/layouts/robots.txt +++ b/site/layouts/robots.txt @@ -1,8 +1,12 @@ # www.robotstxt.org -{{ if (eq (getenv "HUGO_ENV") "production") -}} +{{- $isProduction := eq (getenv "HUGO_ENV") "production" -}} +{{- $isNetlify := eq (getenv "NETLIFY") "true" -}} +{{- $allowCrawling := and (not $isNetlify) $isProduction -}} + +{{ if $allowCrawling }} # Allow crawling of all content {{- end }} User-agent: * -Disallow:{{ if (ne (getenv "HUGO_ENV") "production") }} /{{ end }} +Disallow:{{ if not $allowCrawling }} /{{ end }} Sitemap: {{ .Site.BaseURL }}/sitemap.xml From 8b2b490f9b58a02494fe8567d6ce5b9c11a9bf65 Mon Sep 17 00:00:00 2001 From: Johann-S Date: Fri, 2 Aug 2019 15:51:05 +0200 Subject: [PATCH 2/8] add a way to disable jQuery detection --- js/src/alert/alert.js | 6 ++-- js/src/button/button.js | 6 ++-- js/src/carousel/carousel.js | 6 ++-- js/src/collapse/collapse.js | 6 ++-- js/src/dom/event-handler.js | 5 +-- js/src/dropdown/dropdown.js | 6 ++-- js/src/modal/modal.js | 6 ++-- js/src/popover/popover.js | 6 ++-- js/src/scrollspy/scrollspy.js | 6 ++-- js/src/tab/tab.js | 6 ++-- js/src/toast/toast.js | 6 ++-- js/src/tooltip/tooltip.js | 6 ++-- js/src/util/index.js | 13 ++++++-- js/src/util/index.spec.js | 33 +++++++++++++++++++ .../docs/4.3/getting-started/javascript.md | 2 +- 15 files changed, 92 insertions(+), 27 deletions(-) diff --git a/js/src/alert/alert.js b/js/src/alert/alert.js index 793b5989af00..024528b81686 100644 --- a/js/src/alert/alert.js +++ b/js/src/alert/alert.js @@ -6,7 +6,7 @@ */ import { - jQuery as $, + getjQuery, TRANSITION_END, emulateTransitionEnd, getElementFromSelector, @@ -165,6 +165,8 @@ class Alert { EventHandler .on(document, Event.CLICK_DATA_API, Selector.DISMISS, Alert.handleDismiss(new Alert())) +const $ = getjQuery() + /** * ------------------------------------------------------------------------ * jQuery @@ -173,7 +175,7 @@ EventHandler */ /* istanbul ignore if */ -if (typeof $ !== 'undefined') { +if ($) { const JQUERY_NO_CONFLICT = $.fn[NAME] $.fn[NAME] = Alert.jQueryInterface $.fn[NAME].Constructor = Alert diff --git a/js/src/button/button.js b/js/src/button/button.js index b7e20461d6e2..d64f5130e263 100644 --- a/js/src/button/button.js +++ b/js/src/button/button.js @@ -5,7 +5,7 @@ * -------------------------------------------------------------------------- */ -import { jQuery as $ } from '../util/index' +import { getjQuery } from '../util/index' import Data from '../dom/data' import EventHandler from '../dom/event-handler' import SelectorEngine from '../dom/selector-engine' @@ -179,6 +179,8 @@ EventHandler.on(document, Event.BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, even } }) +const $ = getjQuery() + /** * ------------------------------------------------------------------------ * jQuery @@ -186,7 +188,7 @@ EventHandler.on(document, Event.BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, even * add .button to jQuery only if jQuery is present */ /* istanbul ignore if */ -if (typeof $ !== 'undefined') { +if ($) { const JQUERY_NO_CONFLICT = $.fn[NAME] $.fn[NAME] = Button.jQueryInterface $.fn[NAME].Constructor = Button diff --git a/js/src/carousel/carousel.js b/js/src/carousel/carousel.js index 0bac655ea0d2..40984fe80fbb 100644 --- a/js/src/carousel/carousel.js +++ b/js/src/carousel/carousel.js @@ -6,7 +6,7 @@ */ import { - jQuery as $, + getjQuery, TRANSITION_END, emulateTransitionEnd, getElementFromSelector, @@ -615,6 +615,8 @@ EventHandler.on(window, Event.LOAD_DATA_API, () => { } }) +const $ = getjQuery() + /** * ------------------------------------------------------------------------ * jQuery @@ -622,7 +624,7 @@ EventHandler.on(window, Event.LOAD_DATA_API, () => { * add .carousel to jQuery only if jQuery is present */ /* istanbul ignore if */ -if (typeof $ !== 'undefined') { +if ($) { const JQUERY_NO_CONFLICT = $.fn[NAME] $.fn[NAME] = Carousel.jQueryInterface $.fn[NAME].Constructor = Carousel diff --git a/js/src/collapse/collapse.js b/js/src/collapse/collapse.js index 79908577639b..4de7b528224a 100644 --- a/js/src/collapse/collapse.js +++ b/js/src/collapse/collapse.js @@ -6,7 +6,7 @@ */ import { - jQuery as $, + getjQuery, TRANSITION_END, emulateTransitionEnd, getSelectorFromElement, @@ -419,6 +419,8 @@ EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function ( }) }) +const $ = getjQuery() + /** * ------------------------------------------------------------------------ * jQuery @@ -426,7 +428,7 @@ EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function ( * add .collapse to jQuery only if jQuery is present */ /* istanbul ignore if */ -if (typeof $ !== 'undefined') { +if ($) { const JQUERY_NO_CONFLICT = $.fn[NAME] $.fn[NAME] = Collapse.jQueryInterface $.fn[NAME].Constructor = Collapse diff --git a/js/src/dom/event-handler.js b/js/src/dom/event-handler.js index 3310b41abdae..71b3a643b881 100644 --- a/js/src/dom/event-handler.js +++ b/js/src/dom/event-handler.js @@ -5,7 +5,7 @@ * -------------------------------------------------------------------------- */ -import { jQuery as $ } from '../util/index' +import { getjQuery } from '../util/index' import { createCustomEvent, defaultPreventedPreservedOnDispatch } from './polyfill' /** @@ -14,6 +14,7 @@ import { createCustomEvent, defaultPreventedPreservedOnDispatch } from './polyfi * ------------------------------------------------------------------------ */ +const $ = getjQuery() const namespaceRegex = /[^.]*(?=\..*)\.|.*/ const stripNameRegex = /\..*/ const keyEventRegex = /^key/ @@ -293,7 +294,7 @@ const EventHandler = { let defaultPrevented = false let evt = null - if (inNamespace && typeof $ !== 'undefined') { + if (inNamespace && $) { jQueryEvent = $.Event(event, args) $(element).trigger(jQueryEvent) diff --git a/js/src/dropdown/dropdown.js b/js/src/dropdown/dropdown.js index 7f5264d05006..2c30ba740a80 100644 --- a/js/src/dropdown/dropdown.js +++ b/js/src/dropdown/dropdown.js @@ -6,7 +6,7 @@ */ import { - jQuery as $, + getjQuery, getElementFromSelector, isElement, makeArray, @@ -526,6 +526,8 @@ EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function ( EventHandler .on(document, Event.CLICK_DATA_API, Selector.FORM_CHILD, e => e.stopPropagation()) +const $ = getjQuery() + /** * ------------------------------------------------------------------------ * jQuery @@ -533,7 +535,7 @@ EventHandler * add .dropdown to jQuery only if jQuery is present */ /* istanbul ignore if */ -if (typeof $ !== 'undefined') { +if ($) { const JQUERY_NO_CONFLICT = $.fn[NAME] $.fn[NAME] = Dropdown.jQueryInterface $.fn[NAME].Constructor = Dropdown diff --git a/js/src/modal/modal.js b/js/src/modal/modal.js index fd24b7768fb2..4864cad9d04e 100644 --- a/js/src/modal/modal.js +++ b/js/src/modal/modal.js @@ -6,7 +6,7 @@ */ import { - jQuery as $, + getjQuery, TRANSITION_END, emulateTransitionEnd, getElementFromSelector, @@ -582,6 +582,8 @@ EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function ( data.show(this) }) +const $ = getjQuery() + /** * ------------------------------------------------------------------------ * jQuery @@ -589,7 +591,7 @@ EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function ( * add .modal to jQuery only if jQuery is present */ /* istanbul ignore if */ -if (typeof $ !== 'undefined') { +if ($) { const JQUERY_NO_CONFLICT = $.fn[NAME] $.fn[NAME] = Modal.jQueryInterface $.fn[NAME].Constructor = Modal diff --git a/js/src/popover/popover.js b/js/src/popover/popover.js index ce92e0d5595c..5da7ffe56258 100644 --- a/js/src/popover/popover.js +++ b/js/src/popover/popover.js @@ -5,7 +5,7 @@ * -------------------------------------------------------------------------- */ -import { jQuery as $ } from '../util/index' +import { getjQuery } from '../util/index' import Data from '../dom/data' import SelectorEngine from '../dom/selector-engine' import Tooltip from '../tooltip/tooltip' @@ -173,13 +173,15 @@ class Popover extends Tooltip { } } +const $ = getjQuery() + /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ */ /* istanbul ignore if */ -if (typeof $ !== 'undefined') { +if ($) { const JQUERY_NO_CONFLICT = $.fn[NAME] $.fn[NAME] = Popover.jQueryInterface $.fn[NAME].Constructor = Popover diff --git a/js/src/scrollspy/scrollspy.js b/js/src/scrollspy/scrollspy.js index b3b87a3b23c0..fa52a128904d 100644 --- a/js/src/scrollspy/scrollspy.js +++ b/js/src/scrollspy/scrollspy.js @@ -6,7 +6,7 @@ */ import { - jQuery as $, + getjQuery, getSelectorFromElement, getUID, makeArray, @@ -336,13 +336,15 @@ EventHandler.on(window, Event.LOAD_DATA_API, () => { .forEach(spy => new ScrollSpy(spy, Manipulator.getDataAttributes(spy))) }) +const $ = getjQuery() + /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ */ /* istanbul ignore if */ -if (typeof $ !== 'undefined') { +if ($) { const JQUERY_NO_CONFLICT = $.fn[NAME] $.fn[NAME] = ScrollSpy.jQueryInterface $.fn[NAME].Constructor = ScrollSpy diff --git a/js/src/tab/tab.js b/js/src/tab/tab.js index 2d4b8e30c427..b2374fe9193a 100644 --- a/js/src/tab/tab.js +++ b/js/src/tab/tab.js @@ -6,7 +6,7 @@ */ import { - jQuery as $, + getjQuery, TRANSITION_END, emulateTransitionEnd, getElementFromSelector, @@ -242,6 +242,8 @@ EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function ( data.show() }) +const $ = getjQuery() + /** * ------------------------------------------------------------------------ * jQuery @@ -249,7 +251,7 @@ EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function ( * add .tab to jQuery only if jQuery is present */ /* istanbul ignore if */ -if (typeof $ !== 'undefined') { +if ($) { const JQUERY_NO_CONFLICT = $.fn[NAME] $.fn[NAME] = Tab.jQueryInterface $.fn[NAME].Constructor = Tab diff --git a/js/src/toast/toast.js b/js/src/toast/toast.js index 51a7c8b35305..4de7db1cd18c 100644 --- a/js/src/toast/toast.js +++ b/js/src/toast/toast.js @@ -6,7 +6,7 @@ */ import { - jQuery as $, + getjQuery, TRANSITION_END, emulateTransitionEnd, getTransitionDurationFromElement, @@ -222,6 +222,8 @@ class Toast { } } +const $ = getjQuery() + /** * ------------------------------------------------------------------------ * jQuery @@ -229,7 +231,7 @@ class Toast { * add .toast to jQuery only if jQuery is present */ /* istanbul ignore if */ -if (typeof $ !== 'undefined') { +if ($) { const JQUERY_NO_CONFLICT = $.fn[NAME] $.fn[NAME] = Toast.jQueryInterface $.fn[NAME].Constructor = Toast diff --git a/js/src/tooltip/tooltip.js b/js/src/tooltip/tooltip.js index 7575bb89db13..33f0173a3f8e 100644 --- a/js/src/tooltip/tooltip.js +++ b/js/src/tooltip/tooltip.js @@ -6,7 +6,7 @@ */ import { - jQuery as $, + getjQuery, TRANSITION_END, emulateTransitionEnd, findShadowRoot, @@ -798,6 +798,8 @@ class Tooltip { } } +const $ = getjQuery() + /** * ------------------------------------------------------------------------ * jQuery @@ -805,7 +807,7 @@ class Tooltip { * add .tooltip to jQuery only if jQuery is present */ /* istanbul ignore if */ -if (typeof $ !== 'undefined') { +if ($) { const JQUERY_NO_CONFLICT = $.fn[NAME] $.fn[NAME] = Tooltip.jQueryInterface $.fn[NAME].Constructor = Tooltip diff --git a/js/src/util/index.js b/js/src/util/index.js index 537b391dccd1..746ee608bc4c 100644 --- a/js/src/util/index.js +++ b/js/src/util/index.js @@ -8,7 +8,6 @@ const MAX_UID = 1000000 const MILLISECONDS_MULTIPLIER = 1000 const TRANSITION_END = 'transitionend' -const { jQuery } = window // Shoutout AngusCroll (https://goo.gl/pxwQGp) const toType = obj => ({}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase()) @@ -176,8 +175,18 @@ const noop = () => function () {} const reflow = element => element.offsetHeight +const getjQuery = () => { + const { jQuery } = window + + if (jQuery && !document.body.hasAttribute('data-no-jquery')) { + return jQuery + } + + return null +} + export { - jQuery, + getjQuery, TRANSITION_END, getUID, getSelectorFromElement, diff --git a/js/src/util/index.spec.js b/js/src/util/index.spec.js index b667c270eafa..9512c2fe0b09 100644 --- a/js/src/util/index.spec.js +++ b/js/src/util/index.spec.js @@ -346,4 +346,37 @@ describe('Util', () => { expect(Util.reflow(div)).toEqual(0) }) }) + + describe('getjQuery', () => { + const fakejQuery = { trigger() {} } + + beforeEach(() => { + Object.defineProperty(window, 'jQuery', { + value: fakejQuery, + writable: true + }) + }) + + afterEach(() => { + window.jQuery = undefined + }) + + it('should return jQuery object when present', () => { + expect(Util.getjQuery()).toEqual(fakejQuery) + }) + + it('should not return jQuery object when present if data-no-jquery', () => { + document.body.setAttribute('data-no-jquery', '') + + expect(window.jQuery).toEqual(fakejQuery) + expect(Util.getjQuery()).toEqual(null) + + document.body.removeAttribute('data-no-jquery') + }) + + it('should not return jQuery if not present', () => { + window.jQuery = undefined + expect(Util.getjQuery()).toEqual(null) + }) + }) }) diff --git a/site/content/docs/4.3/getting-started/javascript.md b/site/content/docs/4.3/getting-started/javascript.md index 36dcd76b71b5..bb7dab105a84 100644 --- a/site/content/docs/4.3/getting-started/javascript.md +++ b/site/content/docs/4.3/getting-started/javascript.md @@ -67,7 +67,7 @@ myModal.addEventListener('show.bs.modal', function (e) { {{< callout warning >}} ## jQuery events -Bootstrap will detect jQuery only if `jQuery` is present in the `window` object. If jQuery is found, Bootstrap will emit events thanks to jQuery's event system. So if you want to listen to Bootstrap's events, you'll have to use the jQuery methods (`.on`, `.one`). +Bootstrap will detect jQuery if `jQuery` is present in the `window` object and no `data-no-jquery` attribute on ``. If jQuery is found, Bootstrap will emit events thanks to jQuery's event system. So if you want to listen to Bootstrap's events, you'll have to use the jQuery methods (`.on`, `.one`) instead of `addEventListener`. {{< highlight js >}} $('#myTab a').on('shown.bs.tab', function () { From a0f3fd2342ecc02407279357c70c3e37af4e4ac6 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 2 Aug 2019 17:24:07 +0300 Subject: [PATCH 3/8] Update javascript.md --- site/content/docs/4.3/getting-started/javascript.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/docs/4.3/getting-started/javascript.md b/site/content/docs/4.3/getting-started/javascript.md index bb7dab105a84..4e3e793dbf7f 100644 --- a/site/content/docs/4.3/getting-started/javascript.md +++ b/site/content/docs/4.3/getting-started/javascript.md @@ -67,7 +67,7 @@ myModal.addEventListener('show.bs.modal', function (e) { {{< callout warning >}} ## jQuery events -Bootstrap will detect jQuery if `jQuery` is present in the `window` object and no `data-no-jquery` attribute on ``. If jQuery is found, Bootstrap will emit events thanks to jQuery's event system. So if you want to listen to Bootstrap's events, you'll have to use the jQuery methods (`.on`, `.one`) instead of `addEventListener`. +Bootstrap will detect jQuery if `jQuery` is present in the `window` object and there is no `data-no-jquery` attribute set on ``. If jQuery is found, Bootstrap will emit events thanks to jQuery's event system. So if you want to listen to Bootstrap's events, you'll have to use the jQuery methods (`.on`, `.one`) instead of `addEventListener`. {{< highlight js >}} $('#myTab a').on('shown.bs.tab', function () { From 81af1bf9cc9c03b9f3ad679676971e01461d2a56 Mon Sep 17 00:00:00 2001 From: Martijn Cuppens Date: Sat, 3 Aug 2019 15:58:25 +0200 Subject: [PATCH 4/8] Change SVG dimensions to px values (#29195) --- site/layouts/partials/home/masthead-followup.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site/layouts/partials/home/masthead-followup.html b/site/layouts/partials/home/masthead-followup.html index 0c6ea9669539..56ad9495883d 100644 --- a/site/layouts/partials/home/masthead-followup.html +++ b/site/layouts/partials/home/masthead-followup.html @@ -2,7 +2,7 @@
- {{ partial "icons/import.svg" (dict "width" "3rem" "height" "3rem") }} + {{ partial "icons/import.svg" (dict "width" "48" "height" "48") }}

Installation

@@ -17,7 +17,7 @@

Installation

- {{ partial "icons/download.svg" (dict "width" "3rem" "height" "3rem") }} + {{ partial "icons/download.svg" (dict "width" "48" "height" "48") }}

BootstrapCDN

@@ -36,7 +36,7 @@

JS and Popper.js
- {{ partial "icons/lightning.svg" (dict "width" "3rem" "height" "3rem") }} + {{ partial "icons/lightning.svg" (dict "width" "48" "height" "48") }}

Official Themes

From 4ae6a29b1237818db71ed284139071c3f3ea8aa3 Mon Sep 17 00:00:00 2001 From: GeoSot Date: Sat, 3 Aug 2019 17:11:57 +0300 Subject: [PATCH 5/8] Allow .page-links to get left margin. (#28948) * Allow .page-links to get left margin. * Add border-radius to page-links in case they have left margin * Apply MartijnCuppens suggestion to _pagination.scss Co-Authored-By: Martijn Cuppens * Plus if/else Rules * Formatting fixes * Fix border-radius for pagination-size * Use mixin for default pagination sizing --- scss/_pagination.scss | 16 +++------------- scss/_variables.scss | 2 ++ scss/mixins/_pagination.scss | 20 ++++++++++++++------ 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/scss/_pagination.scss b/scss/_pagination.scss index 27e7bb80573f..c51272dd7988 100644 --- a/scss/_pagination.scss +++ b/scss/_pagination.scss @@ -6,9 +6,6 @@ .page-link { position: relative; display: block; - padding: $pagination-padding-y $pagination-padding-x; - margin-left: -$pagination-border-width; - line-height: $pagination-line-height; color: $pagination-color; background-color: $pagination-bg; border: $pagination-border-width solid $pagination-border-color; @@ -29,16 +26,8 @@ } .page-item { - &:first-child { - .page-link { - margin-left: 0; - @include border-left-radius($border-radius); - } - } - &:last-child { - .page-link { - @include border-right-radius($border-radius); - } + &:not(:first-child) .page-link { + margin-left: $pagination-margin-left; } &.active .page-link { @@ -62,6 +51,7 @@ // // Sizing // +@include pagination-size($pagination-padding-y, $pagination-padding-x, null, $pagination-line-height, $pagination-border-radius); .pagination-lg { @include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $line-height-lg, $border-radius-lg); diff --git a/scss/_variables.scss b/scss/_variables.scss index 95067724a4cb..d0820794084f 100644 --- a/scss/_variables.scss +++ b/scss/_variables.scss @@ -809,6 +809,8 @@ $pagination-line-height: 1.25 !default; $pagination-color: $link-color !default; $pagination-bg: $white !default; $pagination-border-width: $border-width !default; +$pagination-border-radius: $border-radius !default; +$pagination-margin-left: -$pagination-border-width !default; $pagination-border-color: $gray-300 !default; $pagination-focus-box-shadow: $input-btn-focus-box-shadow !default; diff --git a/scss/mixins/_pagination.scss b/scss/mixins/_pagination.scss index af8e16d6a911..2c31a8cc5109 100644 --- a/scss/mixins/_pagination.scss +++ b/scss/mixins/_pagination.scss @@ -8,14 +8,22 @@ } .page-item { - &:first-child { - .page-link { - @include border-left-radius($border-radius); + @if $pagination-margin-left == (-$pagination-border-width) { + &:first-child { + .page-link { + @include border-left-radius($border-radius); + } } - } - &:last-child { + + &:last-child { + .page-link { + @include border-right-radius($border-radius); + } + } + } @else { + //Add border-radius to all pageLinks in case they have left margin .page-link { - @include border-right-radius($border-radius); + @include border-radius($border-radius); } } } From 7bce809a63a37d1395333b179cd83d710c8ebf6f Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 3 Aug 2019 07:27:33 -0700 Subject: [PATCH 6/8] Mention pagination margin change in migration docs (#29196) From #28948. --- site/content/docs/4.3/migration.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/site/content/docs/4.3/migration.md b/site/content/docs/4.3/migration.md index 1cb256b0d9fa..dd98b6adc47c 100644 --- a/site/content/docs/4.3/migration.md +++ b/site/content/docs/4.3/migration.md @@ -110,6 +110,10 @@ Badges were overhauled to better differentiate themselves from buttons and to be - The jumbotron component is removed in favor of utility classes like `.bg-light` for the background color and `.p-*` classes to control padding. +### Pagination + +- Pagination links now have customizable `margin-left` that are dynamically rounded on all corners when separated from one another. + ### Popovers - Renamed `.arrow` to `.popover-arrow` From b316235e63de14b959d842f9470acc2e97cbe82a Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sun, 4 Aug 2019 08:23:25 +0300 Subject: [PATCH 7/8] docs: Fix badges after #28458. (#29199) --- site/content/docs/4.3/components/list-group.md | 6 +++--- site/content/docs/4.3/examples/checkout/index.html | 2 +- site/content/docs/4.3/examples/offcanvas/index.html | 2 +- site/content/docs/4.3/utilities/text.md | 2 +- site/layouts/shortcodes/list-versions.html | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/site/content/docs/4.3/components/list-group.md b/site/content/docs/4.3/components/list-group.md index 5ce8c3d3f00f..032ef37f5f49 100644 --- a/site/content/docs/4.3/components/list-group.md +++ b/site/content/docs/4.3/components/list-group.md @@ -152,15 +152,15 @@ Add badges to any list group item to show unread counts, activity, and more with

  • Cras justo odio - 14 + 14
  • Dapibus ac facilisis in - 2 + 2
  • Morbi leo risus - 1 + 1
{{< /example >}} diff --git a/site/content/docs/4.3/examples/checkout/index.html b/site/content/docs/4.3/examples/checkout/index.html index ac67d8a6e8d6..e7865ff6ed39 100644 --- a/site/content/docs/4.3/examples/checkout/index.html +++ b/site/content/docs/4.3/examples/checkout/index.html @@ -19,7 +19,7 @@

Checkout form

Your cart - 3 + 3

  • diff --git a/site/content/docs/4.3/examples/offcanvas/index.html b/site/content/docs/4.3/examples/offcanvas/index.html index 85a5cf4f797d..308a95f1ace9 100644 --- a/site/content/docs/4.3/examples/offcanvas/index.html +++ b/site/content/docs/4.3/examples/offcanvas/index.html @@ -49,7 +49,7 @@ Dashboard Friends - 27 + 27 Explore Suggestions diff --git a/site/content/docs/4.3/utilities/text.md b/site/content/docs/4.3/utilities/text.md index 2cc8390e616f..0ea7c75a2edc 100644 --- a/site/content/docs/4.3/utilities/text.md +++ b/site/content/docs/4.3/utilities/text.md @@ -32,7 +32,7 @@ For left, right, and center alignment, responsive classes are available that use Wrap text with a `.text-wrap` class. {{< example >}} -
    +
    This text should wrap.
    {{< /example >}} diff --git a/site/layouts/shortcodes/list-versions.html b/site/layouts/shortcodes/list-versions.html index 5c7f0445a011..6ec61b438b3f 100644 --- a/site/layouts/shortcodes/list-versions.html +++ b/site/layouts/shortcodes/list-versions.html @@ -10,7 +10,7 @@

    {{ $release.group }}

    {{ $version.v }} {{ if (eq $version.v $.Site.Params.docs_version) -}} - Latest + Latest {{- end }} {{ if (eq (add $i 1) $len) }}
    {{ end }} From 2be5f03bfc972df4f837826feecd33a07a83dc7f Mon Sep 17 00:00:00 2001 From: joseigor Date: Sun, 4 Aug 2019 02:42:23 -0300 Subject: [PATCH 8/8] v5: Docs Utilities API updates (#29126) Improvement to better understand how utilities class name are generated by the (_api.scss) base in the line of code below: `$property-class: if($property-class, $property-class, nth($properties, 1));` https://github.com/twbs/bootstrap/blob/fc02932946424e986a72bb7b47044eab815851cb/scss/mixins/_utilities.scss#L21 --- site/content/docs/4.3/utilities/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/docs/4.3/utilities/api.md b/site/content/docs/4.3/utilities/api.md index bfad9474403b..470418bb887e 100644 --- a/site/content/docs/4.3/utilities/api.md +++ b/site/content/docs/4.3/utilities/api.md @@ -13,7 +13,7 @@ The `$utilities` map contains all utilities and is later merged with your custom - `property`: Name of the property, this can be a string or an array of strings (needed for eg. horizontal paddings or margins). - `responsive` _(optional)_: Boolean indicating if responsive classes need to be generated. `false` by default. -- `class` _(optional)_: Variable to change the class name if you don't want it to be the same as the property. +- `class` _(optional)_: Variable to change the class name if you don't want it to be the same as the property. In case you don't provide the `class` key and `property` key is an array of strings, the class name will be the first element of the `property` array. - `values`: This can be a list of values or a map if you don't want the class name to be the same as the value. If null is used as map key, it isn't rendered. - `print` _(optional)_: Boolean indicating if print classes need to be generated. `false` by default.