Merge branch 'jej/demonstrate-details-summary' into 'master'
Demonstrate <details> and <summary> tags in doc/user/markdown.md See merge request gitlab-org/gitlab-ce!14247
This commit is contained in:
commit
f9df0e13e3
1 changed files with 24 additions and 0 deletions
|
@ -596,6 +596,30 @@ See the documentation for HTML::Pipeline's [SanitizationFilter](http://www.rubyd
|
||||||
<dd>Does *not* work **very** well. Use HTML <em>tags</em>.</dd>
|
<dd>Does *not* work **very** well. Use HTML <em>tags</em>.</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
#### Details and Summary
|
||||||
|
|
||||||
|
Content can be collapsed using HTML's [`<details>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details) and [`<summary>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary) tags. This is especially useful for collapsing long logs so they take up less screen space.
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<details>
|
||||||
|
<summary>Click me to collapse/fold.</summary>
|
||||||
|
These details will remain hidden until expanded.
|
||||||
|
|
||||||
|
<pre><code>PASTE LOGS HERE</code></pre>
|
||||||
|
</details>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
**Note:** Unfortunately Markdown is not supported inside these tags, as described by the [markdown specification](https://daringfireball.net/projects/markdown/syntax#html). You can work around this by using HTML, for example you can use `<pre><code>` tags instead of [code fences](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md#code-and-syntax-highlighting).
|
||||||
|
|
||||||
|
```html
|
||||||
|
<details>
|
||||||
|
<summary>Click me to collapse/fold.</summary>
|
||||||
|
These details will remain hidden until expanded.
|
||||||
|
|
||||||
|
<pre><code>PASTE LOGS HERE</code></pre>
|
||||||
|
</details>
|
||||||
|
```
|
||||||
|
|
||||||
### Horizontal Rule
|
### Horizontal Rule
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue