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

Fix 1px gap in admonition design #624

Merged
merged 2 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
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
15 changes: 14 additions & 1 deletion src/qiskit_sphinx_theme/assets/styles/_admonitions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ p.topic-title {
}
}

.admonition p.admonition-title,
p.topic-title {
// We have to add one pixel or else the ::before vertical line has a gap.
margin-left: -0.5625rem;
}

// Admonitions are complex because they use a 3px left border with a different color than the rest
// of the div. If we naively used `border-left`, we'd end up with a weird-looking diagonal, as
// described at
Expand Down Expand Up @@ -149,6 +155,13 @@ div.deprecated {
}
}

div.deprecated,
div.versionadded,
div.versionchanged,
div.versionremoved {
border-radius: 0;
}

div.deprecated::before {
background: var(--qiskit-color-warning-border);
content: "";
Expand All @@ -163,7 +176,7 @@ span.deprecated {
background-color: var(--qiskit-color-warning-background);
font-size: var(--admonition-title-font-size);
line-height: 1.3;
margin: 0 -0.5rem 0.25rem -0.55rem;
margin: 0 -0.5625rem 0.25rem -0.55rem;
padding: 0.4rem;
position: relative;
display: block;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.