fix(docs): center copy icons and wrap full-width tables
This commit is contained in:
@@ -286,9 +286,6 @@ h1 {
|
||||
font-size: 11px;
|
||||
color: var(--muted);
|
||||
}
|
||||
.docs-content div[class*="language-"] > .copy {
|
||||
display: none;
|
||||
}
|
||||
.docs-content pre {
|
||||
overflow: auto;
|
||||
padding: 22px;
|
||||
@@ -310,8 +307,8 @@ h1 {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
.docs-content table:not(:where(.not-prose, .not-prose *)) {
|
||||
display: block;
|
||||
overflow: auto;
|
||||
display: table;
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 12px;
|
||||
@@ -321,21 +318,22 @@ h1 {
|
||||
text-align: left;
|
||||
font-weight: 500;
|
||||
color: var(--muted);
|
||||
white-space: nowrap;
|
||||
white-space: normal;
|
||||
}
|
||||
.docs-content th,
|
||||
.docs-content th:not(:where(.not-prose, .not-prose *)),
|
||||
.docs-content td:not(:where(.not-prose, .not-prose *)) {
|
||||
padding: 13px 12px;
|
||||
border-bottom: 1px solid var(--docs-border);
|
||||
vertical-align: top;
|
||||
min-width: 88px;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.docs-content th:first-child,
|
||||
.docs-content td:first-child {
|
||||
.docs-content th:first-child:not(:where(.not-prose, .not-prose *)),
|
||||
.docs-content td:first-child:not(:where(.not-prose, .not-prose *)) {
|
||||
padding-left: 0;
|
||||
}
|
||||
.docs-content td code {
|
||||
white-space: nowrap;
|
||||
.docs-content :is(th, td):not(:where(.not-prose, .not-prose *)) code {
|
||||
white-space: normal;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.docs-content .custom-block {
|
||||
border: 1px solid var(--docs-border);
|
||||
@@ -609,17 +607,13 @@ a:focus-visible {
|
||||
font-size: 17px;
|
||||
margin-top: 30px;
|
||||
}
|
||||
.docs-content th {
|
||||
.docs-content th:not(:where(.not-prose, .not-prose *)) {
|
||||
color: var(--foreground);
|
||||
background: var(--default-soft);
|
||||
}
|
||||
.docs-content td {
|
||||
.docs-content td:not(:where(.not-prose, .not-prose *)) {
|
||||
line-height: 1.75;
|
||||
}
|
||||
.docs-content table {
|
||||
scrollbar-width: thin;
|
||||
overscroll-behavior-inline: contain;
|
||||
}
|
||||
.docs-content pre {
|
||||
font-size: 13px;
|
||||
line-height: 1.7;
|
||||
@@ -712,25 +706,39 @@ a:focus-visible {
|
||||
overflow: visible;
|
||||
}
|
||||
.docs-content div[class*="language-"] > .copy {
|
||||
display: block;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
top: 6px;
|
||||
right: 8px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
padding: 0;
|
||||
border: 1px solid var(--docs-border);
|
||||
border-radius: 6px;
|
||||
background: var(--surface);
|
||||
color: var(--muted);
|
||||
line-height: 1;
|
||||
}
|
||||
.docs-content div[class*="language-"] > .copy::before {
|
||||
content: "⧉";
|
||||
font-size: 19px;
|
||||
.docs-content div[class*="language-"] > .copy:hover {
|
||||
color: var(--foreground);
|
||||
background: var(--default-soft);
|
||||
}
|
||||
.docs-content div[class*="language-"] > .copy.copied::before {
|
||||
content: "✓";
|
||||
font-size: 15px;
|
||||
.docs-content div[class*="language-"] > .copy:focus-visible {
|
||||
outline: 2px solid var(--focus);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
.docs-content div[class*="language-"] > .copy svg {
|
||||
display: block;
|
||||
grid-area: 1 / 1;
|
||||
}
|
||||
.docs-content div[class*="language-"] > .copy .copied-icon,
|
||||
.docs-content div[class*="language-"] > .copy.copied .copy-icon {
|
||||
display: none;
|
||||
}
|
||||
.docs-content div[class*="language-"] > .copy.copied .copied-icon {
|
||||
display: block;
|
||||
}
|
||||
.docs-content div[class*="language-"] > .lang {
|
||||
right: 48px;
|
||||
|
||||
Reference in New Issue
Block a user