mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
style: improve documentation formatting for layouts
This commit is contained in:
@@ -1,54 +1,53 @@
|
||||
{{- /*
|
||||
Renders an HTML details element.
|
||||
Renders an HTML details element.
|
||||
|
||||
@param {string} [class] The value of the element's class attribute.
|
||||
@param {string} [name] The value of the element's name attribute.
|
||||
@param {string} [summary] The content of the child summary element.
|
||||
@param {string} [title] The value of the element's title attribute.
|
||||
@param {bool} [open=false] Whether to initially display the content of the details element.
|
||||
@param {string} [class] The value of the element's class attribute.
|
||||
@param {string} [name] The value of the element's name attribute.
|
||||
@param {string} [summary] The content of the child summary element.
|
||||
@param {string} [title] The value of the element's title attribute.
|
||||
@param {bool} [open=false] Whether to initially display the content of the details element.
|
||||
|
||||
@reference https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details
|
||||
@reference https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details
|
||||
|
||||
@examples
|
||||
@examples
|
||||
|
||||
{{< details >}}
|
||||
A basic collapsible section.
|
||||
{{< /details >}}
|
||||
{{< details >}}
|
||||
A basic collapsible section.
|
||||
{{< /details >}}
|
||||
|
||||
{{< details summary="Custom Summary Text" >}}
|
||||
Showing custom `summary` text.
|
||||
{{< /details >}}
|
||||
{{< details summary="Custom Summary Text" >}}
|
||||
Showing custom `summary` text.
|
||||
{{< /details >}}
|
||||
|
||||
{{< details summary="Open Details" open=true >}}
|
||||
Contents displayed initially by using `open`.
|
||||
{{< /details >}}
|
||||
{{< details summary="Open Details" open=true >}}
|
||||
Contents displayed initially by using `open`.
|
||||
{{< /details >}}
|
||||
|
||||
{{< details summary="Styled Content" class="my-custom-class" >}}
|
||||
Content can be styled with CSS by specifying a `class`.
|
||||
{{< details summary="Styled Content" class="my-custom-class" >}}
|
||||
Content can be styled with CSS by specifying a `class`.
|
||||
|
||||
Target details element:
|
||||
Target details element:
|
||||
|
||||
```css
|
||||
details.my-custom-class { }
|
||||
```
|
||||
```css
|
||||
details.my-custom-class { }
|
||||
```
|
||||
|
||||
Target summary element:
|
||||
Target summary element:
|
||||
|
||||
```css
|
||||
details.my-custom-class > summary > * { }
|
||||
```
|
||||
```css
|
||||
details.my-custom-class > summary > * { }
|
||||
```
|
||||
|
||||
Target inner content:
|
||||
Target inner content:
|
||||
|
||||
```css
|
||||
details.my-custom-class > :not(summary) { }
|
||||
```
|
||||
{{< /details >}}
|
||||
|
||||
{{< details summary="Grouped Details" name="my-details" >}}
|
||||
Specifying a `name` allows elements to be connected, with only one able to be open at a time.
|
||||
{{< /details >}}
|
||||
```css
|
||||
details.my-custom-class > :not(summary) { }
|
||||
```
|
||||
{{< /details >}}
|
||||
|
||||
{{< details summary="Grouped Details" name="my-details" >}}
|
||||
Specifying a `name` allows elements to be connected, with only one able to be open at a time.
|
||||
{{< /details >}}
|
||||
*/}}
|
||||
|
||||
{{- /* Get arguments. */}}
|
||||
|
||||
Reference in New Issue
Block a user