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 css for <details> / <summary> #2814

Merged
merged 3 commits into from
Feb 18, 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
44 changes: 44 additions & 0 deletions frontend/editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,50 @@ pluto-output mjx-assistive-mml {
overflow: hidden;
}

pluto-output details {
border: 1px solid var(--rule-color);
border-radius: 4px;
padding: 0.5em 0.5em 0;
margin-block-start: 0;
margin-block-end: var(--pluto-cell-spacing);
}

pluto-output details:first-child {
margin-block-start: 0;
}

pluto-output details:last-child {
margin-block-end: 0;
}

pluto-output details summary {
cursor: pointer;
font-family: var(--system-ui-font-stack);
font-weight: bold;
border-radius: 3px;
padding: 0.5em;
margin: -0.5em -0.5em 0;
transition: color .25s ease-in-out, background-color .25s ease-in-out;
/* Border may have transparency, let's not change the border with a background-color */
background-clip: padding-box;
}

pluto-output details summary:hover {
color: var(--blockquote-color);
background-color: var(--blockquote-bg);
}

pluto-output details[open] {
padding: 0.5em;
}

pluto-output details[open] summary {
border-bottom: 1px solid var(--rule-color);
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
margin-bottom: 0.5em;
}

/* HEADER */

header#pluto-nav {
Expand Down
Loading