Skip to content

Commit 5f9e23a

Browse files
authored
fix: hide copy button when JS is disabled
And move the button to the bottom of the box to align with previous tooling
1 parent e4c5662 commit 5f9e23a

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/generators/legacy-html/assets/style.css

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,6 @@ pre {
549549

550550
pre > code {
551551
padding: 0;
552-
float: left;
553552
}
554553

555554
pre + h3 {
@@ -1015,6 +1014,9 @@ kbd {
10151014
filter: invert(1);
10161015
}
10171016

1017+
:root:not(.has-js) .copy-button {
1018+
display: none;
1019+
}
10181020
.copy-button {
10191021
float: right;
10201022
outline: none;
@@ -1029,8 +1031,7 @@ kbd {
10291031
text-transform: uppercase;
10301032
font-weight: 700;
10311033
padding: 0 0.5rem;
1032-
margin-right: 10px;
1033-
margin-top: -2px;
1034+
margin-right: 0.2rem;
10341035
height: 1.5rem;
10351036
transition-property:
10361037
background-color, border-color, color, box-shadow, filter;

0 commit comments

Comments
 (0)