@@ -29,6 +32,62 @@ Adjust the `overflow` property on the fly with four default values and classes.
...
```
+### `overflow-x`
+
+Adjust the `overflow-x` property to affect the overflow of content horizontally.
+
+
+
+
.overflow-x-auto
example on an element
+
with set width and height dimensions.
+
+
+
.overflow-x-hidden
example
+
on an element with set width and height dimensions.
+
+
+
.overflow-x-visible
example
+
on an element with set width and height dimensions.
+
+
+
+
+```html
+
...
+
...
+
...
+
...
+```
+
+### `overflow-y`
+
+Adjust the `overflow-y` property to affect the overflow of content vertically.
+
+
+
+ .overflow-y-auto
example on an element with set width and height dimensions.
+
+
+ .overflow-y-hidden
example on an element with set width and height dimensions.
+
+
+ .overflow-y-visible
example on an element with set width and height dimensions.
+
+
+ .overflow-y-scroll
example on an element with set width and height dimensions.
+
+
+
+```html
+
...
+
...
+
...
+
...
+```
+
Using Sass variables, you may customize the overflow utilities by changing the `$overflows` variable in `_variables.scss`.
## Sass
diff --git a/site/data/sidebar.yml b/site/data/sidebar.yml
index 2b7fddfd4f..c35631add4 100644
--- a/site/data/sidebar.yml
+++ b/site/data/sidebar.yml
@@ -123,6 +123,7 @@
- title: Flex
- title: Float
- title: Interactions
+ - title: Object fit
- title: Opacity
- title: Overflow
- title: Position
diff --git a/site/layouts/shortcodes/example.html b/site/layouts/shortcodes/example.html
index c6dcddbe0d..122dc1a156 100644
--- a/site/layouts/shortcodes/example.html
+++ b/site/layouts/shortcodes/example.html
@@ -17,6 +17,7 @@
{{- $show_markup := .Get "show_markup" | default true -}}
{{- $show_preview := .Get "show_preview" | default true -}}
{{- $input := .Inner -}}
+{{- $content := .Inner -}}
{{- if eq $show_preview true -}}
@@ -40,7 +41,8 @@
{{- end -}}
- {{- $content := replaceRE `
\n` ` ` $input -}}
+ {{- $content = replaceRE `` ` ` $content -}}
+ {{- $content = replaceRE ` ` ` ` $content -}}
{{- $content = replaceRE ` (class=" *?")` "" $content -}}
{{- highlight (trim $content "\n") $lang "" -}}
{{- end -}}
diff --git a/site/layouts/shortcodes/placeholder.html b/site/layouts/shortcodes/placeholder.html
index c267bf4a75..9c915bcd6f 100644
--- a/site/layouts/shortcodes/placeholder.html
+++ b/site/layouts/shortcodes/placeholder.html
@@ -4,11 +4,12 @@
`args` are all optional and can be one of the following:
* title: Used in the SVG `title` tag - default: "Placeholder"
* text: The text to show in the image - default: "width x height"
- * class: Class to add to the `svg` - default: "bd-placeholder-img"
+ * class: Class to add to the `svg` or `img` - default: "bd-placeholder-img"
* color: The text color (foreground) - default: "#dee2e6"
* background: The background color - default: "#868e96"
* width: default: "100%"
* height: default: "180px"
+ * markup: If it should render `svg` or `img` tags - default: "svg"
*/ -}}
{{- $grays := $.Site.Data.grays -}}
@@ -26,8 +27,19 @@
{{- $show_title := not (eq $title "false") -}}
{{- $show_text := not (eq $text "false") -}}
-
- {{- if $show_title }}{{ $title }} {{ end -}}
-
- {{- if $show_text }}{{ $text }} {{ end -}}
-
+{{- $markup := .Get "markup" | default "svg" -}}
+
+
+{{- if eq $markup "img" -}}
+
+{{- else -}}
+
+ {{- if $show_title }}{{ $title }} {{ end -}}
+
+ {{- if $show_text }}{{ $text }} {{ end -}}
+
+{{- end -}}
--
2.47.2