2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-14 18:42:30 +03:00

Improve callout shortcode. (#31802)

Remove the `markdownify` call, and instead rely on Hugo's proper syntax; `{{% callout %}}` when we want to the content to be processed as Markdown.

This allows for stuff like:

{{% callout info %}}
##### I'm an info callout!

```css
.foo {
  color: #fff;
}
```

{{< example >}}
<div class="alert alert-warning alert-dismissible fade show" role="alert">
  <strong>Holy guacamole!</strong> You should check in on some of those fields below.
  <button type="button" class="btn-close" data-dismiss="alert" aria-label="Close"></button>
</div>
{{< /example >}}
{{% /callout %}}
This commit is contained in:
XhmikosR
2020-10-12 09:06:06 +03:00
committed by GitHub
parent c8523d71e7
commit 5c6925385e
35 changed files with 131 additions and 131 deletions
+4 -4
View File
@@ -366,9 +366,9 @@ These changes, and more, are demonstrated below.
</fieldset>
</form>
{{< callout warning >}}
{{% callout warning %}}
{{< partial "callout-warning-input-support.md" >}}
{{< /callout >}}
{{% /callout %}}
### Pointers on buttons
@@ -441,10 +441,10 @@ HTML5 adds [a new global attribute named `[hidden]`](https://developer.mozilla.o
<input type="text" hidden>
{{< /highlight >}}
{{< callout warning >}}
{{% callout warning %}}
##### jQuery incompatibility
`[hidden]` is not compatible with jQuery's `$(...).hide()` and `$(...).show()` methods. Therefore, we don't currently especially endorse `[hidden]` over other techniques for managing the `display` of elements.
{{< /callout >}}
{{% /callout %}}
To merely toggle the visibility of an element, meaning its `display` is not modified and the element can still affect the flow of the document, use [the `.invisible` class]({{< docsref "/utilities/visibility" >}}) instead.
+4 -4
View File
@@ -68,9 +68,9 @@ Use contextual classes to color tables, table rows or individual cells.
</tr>
{{< /highlight >}}
{{< callout info >}}
{{% callout info %}}
{{< partial "callout-warning-color-assistive-technologies.md" >}}
{{< /callout >}}
{{% /callout %}}
## Accented tables
@@ -618,11 +618,11 @@ You can also put the `<caption>` on the top of the table with `.caption-top`.
Responsive tables allow tables to be scrolled horizontally with ease. Make any table responsive across all viewports by wrapping a `.table` with `.table-responsive`. Or, pick a maximum breakpoint with which to have a responsive table up to by using `.table-responsive{-sm|-md|-lg|-xl|-xxl}`.
{{< callout warning >}}
{{% callout warning %}}
##### Vertical clipping/truncation
Responsive tables make use of `overflow-y: hidden`, which clips off any content that goes beyond the bottom or top edges of the table. In particular, this can clip off dropdown menus and other third-party widgets.
{{< /callout >}}
{{% /callout %}}
### Always responsive