From 94c46cc4f867d55f166b5026780a408755983829 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Wed, 13 Jan 2021 09:34:52 +0200 Subject: [PATCH 01/22] Tweak scss-docs shortcode --- site/layouts/shortcodes/scss-docs.html | 39 +++++++++++++++----------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/site/layouts/shortcodes/scss-docs.html b/site/layouts/shortcodes/scss-docs.html index 4a525e4de..4712be5d1 100644 --- a/site/layouts/shortcodes/scss-docs.html +++ b/site/layouts/shortcodes/scss-docs.html @@ -5,29 +5,34 @@ comments in the docs. Optional parameters: - strip-default: Remove the ` !default` flag from variable assignments - default: `true` + * strip-default: Remove the ` !default` flag from variable assignments - default: `true` */ -}} {{- $name := .Get "name" -}} {{- $file := .Get "file" -}} {{- $strip_default := .Get "strip-default" | default "true" -}} -{{- $start := printf "// scss-docs-start %s\n" $name -}} -{{- $end := printf "\n// scss-docs-end %s" $name -}} -{{- $regex := printf "%s(.|\n)*%s" $start $end -}} +{{- /* If any parameters are missing, print an error and exit */ -}} +{{- if or (not $name) (not $file) -}} + {{- errorf "Missing required parameters! Got: name=%q file=%q! (called in %q)" $name $file $.Page.Path -}} +{{- else -}} + {{- $start := printf "// scss-docs-start %s\n" $name -}} + {{- $end := printf "\n// scss-docs-end %s" $name -}} + {{- $regex := printf "%s(.|\n)*%s" $start $end -}} -{{- $css := readFile $file -}} -{{- $match := findRE $regex $css 1 -}} + {{- $css := readFile $file -}} + {{- $match := findRE $regex $css 1 -}} -{{- if (eq (len $match) 0) -}} - {{- errorf "Got no matches for %q in %q! (called in %q)" $name $file $.Page.Path -}} + {{- if (eq (len $match) 0) -}} + {{- errorf "Got no matches for name=%q in file=%q! (called in %q)" $name $file $.Page.Path -}} + {{- end -}} + + {{- $remove_start := replace (index $match 0) $start "" -}} + {{- $result := replace $remove_start $end "" -}} + + {{- if (ne $strip_default "false") -}} + {{- $result = replace $result " !default" "" -}} + {{- end -}} + + {{- highlight $result "scss" "" -}} {{- end -}} - -{{- $remove_start := replace (index $match 0) $start "" -}} -{{- $result := replace $remove_start $end "" -}} - -{{- if (ne $strip_default "false") -}} - {{- $result = replace $result " !default" "" -}} -{{- end -}} - -{{- highlight $result "scss" "" -}} From ed5ddca5ba6436a6234e1b9dfa0883382c84f0db Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Wed, 13 Jan 2021 10:52:41 +0200 Subject: [PATCH 02/22] Stylelint: disallow some property values (#32756) * `border: none` * `outline: none` --- .stylelintrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.stylelintrc b/.stylelintrc index 1c9ee1811..c068d30b5 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -3,6 +3,10 @@ "stylelint-config-twbs-bootstrap/scss" ], "rules": { + "declaration-property-value-disallowed-list": { + "border": "none", + "outline": "none" + }, "function-disallowed-list": [ "calc", "lighten", From f43133ac412eb47111d09e89750a130cc79b9835 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Wed, 13 Jan 2021 13:20:49 +0200 Subject: [PATCH 03/22] .gitignore: remove Ruby/Jekyll entries (#32770) Our currently supported branches, v4-dev and main, use Hugo. --- .gitignore | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.gitignore b/.gitignore index 6208c57d7..0a0f88d15 100644 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,8 @@ # Ignore docs files /_gh_pages/ -# This is the old Jekyll docs dist folder; -# keeping it here so that when we switch branches it doesn't show up -/site/docs/**/dist/ -# Jekyll's cache folder; keeping it for the same reason as above -/site/.jekyll-cache/ # Hugo resources folder /resources/ -# Ignore ruby/bundler files; -# keeping them here so that when we switch branches they don't show up -/.bundle/ -/vendor/ -/.ruby-version - # Numerous always-ignore extensions *.diff *.err From 408b2558dcdacfbe5754103519e5d67d9c1c149b Mon Sep 17 00:00:00 2001 From: Marcin Kasperski Date: Wed, 13 Jan 2021 18:05:25 +0100 Subject: [PATCH 04/22] Update toasts.md (#32782) * dropped mention of `backdrop-filter` * changed mention of `.text-white` to `.btn-close-white` on close button --- site/content/docs/5.0/components/toasts.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/content/docs/5.0/components/toasts.md b/site/content/docs/5.0/components/toasts.md index b6f7e3893..bd7bcae9c 100644 --- a/site/content/docs/5.0/components/toasts.md +++ b/site/content/docs/5.0/components/toasts.md @@ -43,7 +43,7 @@ Toasts are as flexible as you need and have very little required markup. At a mi ### Translucent -Toasts are slightly translucent, too, so they blend over whatever they might appear over. For browsers that support the `backdrop-filter` CSS property, we'll also attempt to blur the elements under a toast. +Toasts are slightly translucent, too, so they blend over whatever they might appear over. {{< example class="bg-dark" >}}