expand: don't handle expand as task list in bullet point list #508

This commit is contained in:
Sören Weber 2023-03-28 19:52:56 +02:00
parent 689abf0706
commit fbec0ece8f
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
4 changed files with 185 additions and 8 deletions

View file

@ -0,0 +1,172 @@
+++
description = "Test shortcodes inside of list items"
title = "Lists"
+++
## Plain
- one
- two
- two
and a half
- three
## Attachments
- one
- two
- {{% attachments style="blue" /%}}
{{% attachments style="blue" /%}}
- three
## Badge
- one
- two
- {{% badge color="fuchsia" icon="fab fa-hackerrank" %}}Awesome{{% /badge %}} 
{{% badge color="fuchsia" icon="fab fa-hackerrank" %}}Awesome{{% /badge %}}
- three
## Button
- one
- two
- {{% button href="https://gohugo.io/" style="warning" icon="dragon" %}}Get Hugo{{% /button %}} 
{{% button href="https://gohugo.io/" style="warning" icon="dragon" %}}Get Hugo{{% /button %}}
- three
## Children
- one
- two
- {{% children sort="weight" %}}
{{% children sort="weight" %}}
- three
## Expand
- one
- two
- {{% expand title="Expand me..." %}}Thank you!{{% /expand %}}
{{% expand title="Expand me..." %}}Thank you!{{% /expand %}}
- three
## Icon
- one
- two
- {{% icon icon="exclamation-triangle" %}} 
{{% icon icon="exclamation-triangle" %}}
- three
## Include
- one
- two
- {{% include file="shortcodes/INCLUDE_ME.md" %}}
{{% include file="shortcodes/INCLUDE_ME.md" %}}
- three
## Math
- one
- two
- {{< math align="center" >}}
$$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$
{{< /math >}}
{{< math align="center" >}}
$$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$
{{< /math >}}
- three
## Mermaid
- one
- two
- {{< mermaid align="center" zoom="true" >}}
graph LR;
If --> Then
Then --> Else
{{< /mermaid >}}
{{< mermaid align="center" zoom="true" >}}
graph LR;
If --> Then
Then --> Else
{{< /mermaid >}}
- three
## Notice
- one
- two
- {{% notice style="primary" title="There may be pirates" icon="skull-crossbones" %}}
It is all about the boxes.
{{% /notice %}}
{{% notice style="primary" title="There may be pirates" icon="skull-crossbones" %}}
It is all about the boxes.
{{% /notice %}}
- three
## Siteparam
- one
- two
- {{% siteparam name="editURL" %}}
{{% siteparam name="editURL" %}}
- three
## Tabs
- one
- two
- {{< tabs >}}
{{% tab name="python" %}}
```python
print("Hello World!")
```
{{% /tab %}}
{{% tab name="bash" %}}
```bash
echo "Hello World!"
```
{{% /tab %}}
{{< /tabs >}}
{{< tabs >}}
{{% tab name="python" %}}
```python
print("Hello World!")
```
{{% /tab %}}
{{% tab name="bash" %}}
```bash
echo "Hello World!"
```
{{% /tab %}}
{{< /tabs >}}
- three

View file

@ -0,0 +1,5 @@
+++
description = "Test shortcodes inside of list items"
title = "Lists"
+++
{{< piratify >}}

View file

@ -171,7 +171,7 @@
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
article ul li:has(input[type="checkbox"]) {
article ul > li:has(> input[type="checkbox"]) {
margin-left: -1rem;
}
/* tabs */
@ -748,12 +748,12 @@
color: #4a4a4a; /* var(--MAIN-TITLES-TEXT-color) */
}
article ul li input[type="checkbox"] {
article ul > li > input[type="checkbox"] {
background-color: #ffffff; /* var(--INTERNAL-MAIN-BG-color); */
color: #101010; /* var(--INTERNAL-MAIN-TEXT-color) */
}
article ul li input[type="checkbox"]::before {
article ul > li > input[type="checkbox"]::before {
box-shadow: inset 1em 1em #7dc903; /* var(--INTERNAL-PRIMARY-color) */
}

View file

@ -1586,17 +1586,17 @@ input[type="search"]::-webkit-search-results-decoration { display: none; }
}
/* task list and its checkboxes */
article ul li:has(input[type="checkbox"]) {
article ul > li:has(> input[type="checkbox"]) {
list-style: none;
margin-inline-start: -1rem;
}
article ul li:has(input[type="checkbox"])::before {
article ul > li:has(> input[type="checkbox"])::before {
content: "\200B"; /* accessibilty for Safari https://developer.mozilla.org/en-US/docs/Web/CSS/list-style */
}
/* https://moderncss.dev/pure-css-custom-checkbox-style/ */
article ul li input[type="checkbox"] {
article ul > li > input[type="checkbox"] {
-webkit-appearance: none;
appearance: none;
/* For iOS < 15 */
@ -1613,7 +1613,7 @@ article ul li input[type="checkbox"] {
width: 1.15em;
}
article ul li input[type="checkbox"]::before {
article ul > li > input[type="checkbox"]::before {
box-shadow: inset 1em 1em var(--INTERNAL-PRIMARY-color);
clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
content: "";
@ -1626,7 +1626,7 @@ article ul li input[type="checkbox"]::before {
background-color: CanvasText;
}
article ul li input[type="checkbox"]:checked::before {
article ul > li > input[type="checkbox"]:checked::before {
transform: scale(1);
}