Skip to content

Commit 4d1df2b

Browse files
authored
Add styling to details tag (#235)
* feat: Add styling to details tag * feat: Added underline + example * feat: Removed inline style in example * feat: Fixed hover color transition
1 parent bbfa436 commit 4d1df2b

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

assets/css/v2/style.css

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,26 @@ button:has(~ .product-selector[style*="none"]) > .product-selector-button-icon {
10141014
align-items: flex-start;
10151015
}
10161016

1017+
/* Details/Summary */
1018+
details summary {
1019+
color: oklch(var(--color-brand));
1020+
transition: text-decoration-color 0.15s ease-in-out;
1021+
text-decoration: underline;
1022+
text-decoration-color: oklch(var(--color-brand) / 0.3);
1023+
1024+
& ~ * {
1025+
margin-top: 1rem;
1026+
}
1027+
}
1028+
1029+
details summary:hover {
1030+
text-decoration-color: oklch(var(--color-brand) / 0.8);
1031+
}
1032+
1033+
details:hover {
1034+
cursor: pointer;
1035+
}
1036+
10171037
/* Table of Contents */
10181038
#TableOfContents {
10191039
/* Close all TOC on sidebar */
@@ -1096,7 +1116,7 @@ h3:target,
10961116
h4:target,
10971117
h5:target,
10981118
h6:target {
1099-
color: var(--color-brand);
1119+
color: oklch(var(--color-brand));
11001120

11011121
.headerlink::before {
11021122
display: block !important;

exampleSite/content/test-product/everything.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,9 @@ This won't render anything.
6464

6565
{{< see-also >}}See also!{{< /see-also >}}
6666

67+
68+
## details
69+
<details open>
70+
<summary>Learn how to pin NGINX Plus to a specific version</summary>
71+
And this is the content on how to do so.
72+
</details>

0 commit comments

Comments
 (0)