Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add interface and child admonition styling #15

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 58 additions & 1 deletion material-overrides/assets/stylesheets/wormhole.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
--light-transparent-90: rgba(255, 255, 255, 0.9);
--light-transparent-60: rgba(255, 255, 255, 0.6);
--light-transparent-40: rgba(255, 255, 255, 0.4);
--light-transparent-20: rgba(255, 255, 255, 0.2);
--light-transparent-12: rgba(255, 255, 255, 0.12);
--light-transparent-10: rgba(255, 255, 255, 0.1);
--light-transparent-07: rgba(255, 255, 255, 0.07);
--plum: #c1bbf6;
--plum-transparent-70: rgba(193, 187, 246, 0.7);
--plum-transparent-50: rgba(193, 187, 246, 0.5);
Expand Down Expand Up @@ -686,10 +688,17 @@ pre .md-clipboard {

.md-typeset .tabbed-block p,
.md-typeset .tabbed-block ul,
.md-typeset .tabbed-block ol {
.md-typeset .tabbed-block ol,
.md-typeset .tabbed-block p~div,
.md-typeset .tabbed-block details {
margin: 1em;
}

.md-typeset .tabbed-block ul p,
.md-typeset .tabbed-block ol p {
margin: 0;
}

/* Document date styling */
.md-source-file small {
display: flex;
Expand Down Expand Up @@ -1253,4 +1262,52 @@ label[for='__search']:hover {
/* Cookie consent styling */
.md-consent__inner {
box-shadow: 0 0 .2rem #ffffff1a,0 .2rem .4rem #fff3;
}

/* Interface admonition styling */
details.interface>summary::before {
display: none;
}

.md-typeset details.interface {
border: 1px solid var(--light-transparent-20);
box-shadow: none;
width: auto;
}

[dir=ltr] .md-typeset details.interface>summary {
padding: 1em 0 1em 1em;
background-color: var(--light-transparent-07);
}

.md-typeset details.interface>summary:after {
top: auto;
}

/* Child admonition styling */
details.child summary::before {
display: none;
}

details.child {
width: fit-content;
}

[dir=ltr] .md-typeset details.child summary {
width: fit-content;
padding-left: 1em;
}

[dir=ltr] .md-typeset details.child[open] {
width: auto;
}

.md-typeset details.child summary {
background-color: unset;
}

.md-typeset details.child {
width: fit-content;
border: 1px solid var(--light-transparent-20);
box-shadow: none;
}