Skip to content

Commit b39d9a5

Browse files
committed
Fix 1px gap in admonition design (#624)
This has always been a bug that we didn't catch. This PR also fixes that deprecations had a rounded border.
1 parent 95604ae commit b39d9a5

7 files changed

+14
-1
lines changed

src/qiskit_sphinx_theme/assets/styles/_admonitions.scss

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ p.topic-title {
3232
}
3333
}
3434

35+
.admonition p.admonition-title,
36+
p.topic-title {
37+
// We have to add one pixel or else the ::before vertical line has a gap.
38+
margin-left: -0.5625rem;
39+
}
40+
3541
// Admonitions are complex because they use a 3px left border with a different color than the rest
3642
// of the div. If we naively used `border-left`, we'd end up with a weird-looking diagonal, as
3743
// described at
@@ -149,6 +155,13 @@ div.deprecated {
149155
}
150156
}
151157

158+
div.deprecated,
159+
div.versionadded,
160+
div.versionchanged,
161+
div.versionremoved {
162+
border-radius: 0;
163+
}
164+
152165
div.deprecated::before {
153166
background: var(--qiskit-color-warning-border);
154167
content: "";
@@ -163,7 +176,7 @@ span.deprecated {
163176
background-color: var(--qiskit-color-warning-background);
164177
font-size: var(--admonition-title-font-size);
165178
line-height: 1.3;
166-
margin: 0 -0.5rem 0.25rem -0.55rem;
179+
margin: 0 -0.5625rem 0.25rem -0.55rem;
167180
padding: 0.4rem;
168181
position: relative;
169182
display: block;
-61 Bytes
Loading
-5 Bytes
Loading
-49 Bytes
Loading
-68 Bytes
Loading
-6 Bytes
Loading
-41 Bytes
Loading

0 commit comments

Comments
 (0)