Fix rendering on webkit

This commit is contained in:
damii 2024-11-17 22:15:46 +11:00
parent 38763aff09
commit 69dbd9fa7b
13 changed files with 252 additions and 282 deletions

View file

@ -1,6 +1,6 @@
[data-scope="collapsible"][data-part="root"] {
padding: 0.673rem;
background-color: hsl(var(--white) 40 50 / 0.1);
background-color: hsl(var(--white) 40% 50% / 0.1);
border-radius: 0.618rem;
}
@ -48,7 +48,7 @@
}
&:hover {
background-color: hsl(var(--white) 40 50 / 0.1);
background-color: hsl(var(--white) 40% 50% / 0.1);
}
&[data-state="open"] {

View file

@ -6,7 +6,7 @@
display: flex;
flex-direction: column;
border-radius: 6px;
border: 1px solid hsla(var(--blue) 10 15 / 0.6);
border: 1px solid hsl(var(--blue) 10% 15% / 0.6);
margin-top: 1rem;
& .root-nav-entry {
@ -17,7 +17,7 @@
padding: 0.5rem 1rem;
&:not(:last-child) {
border-bottom: 1px solid hsla(var(--blue) 10 15 / 0.6);
border-bottom: 1px solid hsl(var(--blue) 10% 15% / 0.6);
}
}
}
@ -33,7 +33,7 @@
}
.type-module {
color: hsl(var(--blue) 75 60);
color: hsl(var(--blue) 75% 60%);
}
.typedocs-subheading > span > p {
@ -147,7 +147,7 @@
}
.typedata-param {
color: hsla(var(--prop-link-color) / 1);
color: hsl(var(--prop-link-color) / 1);
}
.type-datatype {
@ -162,10 +162,10 @@
.typeprops {
& .typeprop-root {
border: 1px solid hsla(var(--prop-color) / 0.6);
border: 1px solid hsl(var(--prop-color) / 0.6);
&:hover {
border: 1px solid hsla(var(--prop-color));
border: 1px solid hsl(var(--prop-color));
& .type-datatype {
opacity: 1;
@ -180,21 +180,21 @@
html.dark .typeprops {
& .typeprop-root {
border: 1px solid hsla(var(--prop-color) / 0.3);
border: 1px solid hsl(var(--prop-color) / 0.3);
&:hover,
&:target {
border: 1px solid hsla(var(--prop-color) / 0.6);
border: 1px solid hsl(var(--prop-color) / 0.6);
}
}
}
.typefuncs {
& .typefunc-root {
border: 1px solid hsla(var(--func-color) / 0.6);
border: 1px solid hsl(var(--func-color) / 0.6);
&:hover {
border: 1px solid hsla(var(--func-color));
border: 1px solid hsl(var(--func-color));
& .type-datatype {
opacity: 1;
@ -223,21 +223,21 @@ html.dark .typeprops {
html.dark .typefuncs {
& .typefunc-root {
border: 1px solid hsla(var(--func-color) / 0.3);
border: 1px solid hsl(var(--func-color) / 0.3);
&:hover,
&:target {
border: 1px solid hsla(var(--func-color) / 0.6);
border: 1px solid hsl(var(--func-color) / 0.6);
}
}
}
.typesignals {
& .typesignal-root {
border: 1px solid hsla(var(--signal-color) / 0.6);
border: 1px solid hsl(var(--signal-color) / 0.6);
&:hover {
border: 1px solid hsla(var(--signal-color));
border: 1px solid hsl(var(--signal-color));
& .typesignal-doclink {
opacity: 1;
@ -275,21 +275,21 @@ html.dark .typefuncs {
html.dark .typesignals {
& .typesignal-root {
border: 1px solid hsla(var(--signal-color) / 0.3);
border: 1px solid hsl(var(--signal-color) / 0.3);
&:hover,
&:target {
border: 1px solid hsla(var(--signal-color) / 0.6);
border: 1px solid hsl(var(--signal-color) / 0.6);
}
}
}
.typevariants {
& .typevariant-root {
border: 1px solid hsla(var(--var-color) / 0.6);
border: 1px solid hsl(var(--var-color) / 0.6);
&:hover {
border: 1px solid hsla(var(--var-color));
border: 1px solid hsl(var(--var-color));
& .typevariant-doclink {
opacity: 1;
@ -314,11 +314,11 @@ html.dark .typesignals {
html.dark .typevariants {
& .typevariant-root {
border: 1px solid hsla(var(--var-color) / 0.3);
border: 1px solid hsl(var(--var-color) / 0.3);
&:hover,
&:target {
border: 1px solid hsla(var(--var-color) / 0.6);
border: 1px solid hsl(var(--var-color) / 0.6);
}
}
}
@ -335,11 +335,11 @@ html.dark .typevariants {
.root-nav {
& .root-nav-entry {
display: grid;
grid-template-columns: 0.60fr 1.40fr;
grid-template-columns: 0.6fr 1.4fr;
& .root-nav-desc {
padding-left: 1rem;
border-left: 1px solid hsl(var(--blue) 10 15 / 0.6);
border-left: 1px solid hsl(var(--blue) 10% 15% / 0.6);
}
}
}

View file

@ -46,7 +46,12 @@
}
}
& p, h1, h2, h3, h4, h5 {
& p,
h1,
h2,
h3,
h4,
h5 {
margin-block: 0.618rem;
}
@ -144,17 +149,17 @@ ul {
}
.docs-collapsible {
background-color: hsl(var(--white) 40 50 / 0.1);
background-color: hsl(var(--white) 40% 50% / 0.1);
border-radius: 0.618rem;
overflow: hidden;
& summary {
padding: 1.2rem;
user-select: none;
box-shadow: 0 0 0.5rem 0px rgba(0 0 0 / 0.25);
box-shadow: 0 0 0.5rem 0px rgba(0deg 0% 0% / 0.25);
&:hover {
background-color: hsla(250 11 100 / 0.06);
background-color: hsl(250deg 11% 100% / 0.06);
cursor: pointer;
}
@ -180,9 +185,9 @@ ul {
.docs-collapsible[open]:not(.closing) {
& summary {
background-color: hsla(250 11 100 / 0.03);
background-color: hsl(250deg 11% 100% / 0.03);
&:hover {
background-color: hsla(250 11 100 / 0.06);
background-color: hsl(250deg 11% 100% / 0.06);
cursor: pointer;
}

View file

@ -4,65 +4,32 @@
}
#qs_search {
--search-result-spacing: calc(
1.25rem *
var(--pagefind-ui-scale)
);
--search-result-pad-inline-start: calc(
3.75rem *
var(--pagefind-ui-scale)
);
--search-result-pad-inline-end: calc(
1.25rem *
var(--pagefind-ui-scale)
);
--search-result-pad-block: calc(
0.9375rem *
var(--pagefind-ui-scale)
);
--search-result-nested-pad-block: calc(
0.625rem *
var(--pagefind-ui-scale)
);
--search-result-spacing: calc(1.25rem * var(--pagefind-ui-scale));
--search-result-pad-inline-start: calc(3.75rem * var(--pagefind-ui-scale));
--search-result-pad-inline-end: calc(1.25rem * var(--pagefind-ui-scale));
--search-result-pad-block: calc(0.9375rem * var(--pagefind-ui-scale));
--search-result-nested-pad-block: calc(0.625rem * var(--pagefind-ui-scale));
--search-corners: calc(0.3125rem * var(--pagefind-ui-scale));
--search-page-icon-size: calc(
1.875rem *
var(--pagefind-ui-scale)
);
--search-page-icon-size: calc(1.875rem * var(--pagefind-ui-scale));
--search-page-icon-inline-start: calc(
(
var(--search-result-pad-inline-start) -
var(--search-page-icon-size)
) /
2
);
--search-tree-diagram-size: calc(
2.5rem *
var(--pagefind-ui-scale)
(var(--search-result-pad-inline-start) - var(--search-page-icon-size)) / 2
);
--search-tree-diagram-size: calc(2.5rem * var(--pagefind-ui-scale));
--search-tree-diagram-inline-start: calc(
(
var(--search-result-pad-inline-start) -
var(--search-tree-diagram-size)
) /
2
(var(--search-result-pad-inline-start) - var(--search-tree-diagram-size)) /
2
);
}
#qs_search .pagefind-ui__form::before {
--pagefind-ui-text: hsl(0 0 65);
--pagefind-ui-text: hsl(0deg 0% 65%);
opacity: 1;
outline: unset;
}
#qs_search
.pagefind-ui--reset
*:where(
:not(html, iframe, canvas, img, svg, video):not(
svg *,
symbol *
)
) {
*:where(:not(html, iframe, canvas, img, svg, video):not(svg *, symbol *)) {
outline: unset;
}
@ -73,7 +40,7 @@
}
#qs_search input:focus {
--pagefind-ui-border: hsla(var(--accent-500));
--pagefind-ui-border: hsl(var(--accent-500));
}
#qs_search .pagefind-ui__search-clear {
@ -85,7 +52,7 @@
}
#qs_search .pagefind-ui__search-clear:focus {
outline: 1px solid hsla(var(--accent-600));
outline: 1px solid hsl(var(--accent-600));
}
#qs_search .pagefind-ui__search-clear::before {
@ -94,7 +61,7 @@
center / 50% no-repeat;
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m13.41 12 6.3-6.29a1 1 0 1 0-1.42-1.42L12 10.59l-6.29-6.3a1 1 0 0 0-1.42 1.42l6.3 6.29-6.3 6.29a1 1 0 0 0 .33 1.64 1 1 0 0 0 1.09-.22l6.29-6.3 6.29 6.3a1 1 0 0 0 1.64-.33 1 1 0 0 0-.22-1.09L13.41 12Z'/%3E%3C/svg%3E")
center / 50% no-repeat;
background-color: hsl(0 25 45);
background-color: hsl(0deg 25% 45%);
display: block;
width: 100%;
height: 100%;
@ -117,18 +84,14 @@
}
#qs_search
.pagefind-ui__result-title:not(
:where(.pagefind-ui__result-nested *)
),
.pagefind-ui__result-title:not(:where(.pagefind-ui__result-nested *)),
#qs_search .pagefind-ui__result-nested {
position: relative;
background-color: hsl(0 0 10);
background-color: hsl(0deg 0% 10%);
}
#qs_search
.pagefind-ui__result-title:not(
:where(.pagefind-ui__result-nested *)
):hover,
.pagefind-ui__result-title:not(:where(.pagefind-ui__result-nested *)):hover,
#qs_search
.pagefind-ui__result-title:not(
:where(.pagefind-ui__result-nested *)
@ -159,23 +122,18 @@
border-radius: 0 0 var(--search-corners) var(--search-corners);
}
#qs_search
.pagefind-ui__result-inner
> .pagefind-ui__result-title {
padding: var(--search-result-pad-block)
var(--search-result-pad-inline-end);
#qs_search .pagefind-ui__result-inner > .pagefind-ui__result-title {
padding: var(--search-result-pad-block) var(--search-result-pad-inline-end);
padding-inline-start: var(--search-result-pad-inline-start);
}
#qs_search
.pagefind-ui__result-inner
> .pagefind-ui__result-title::before {
#qs_search .pagefind-ui__result-inner > .pagefind-ui__result-title::before {
content: "";
position: absolute;
inset-block: 0;
inset-inline-start: var(--search-page-icon-inline-start);
width: var(--search-page-icon-size);
background: hsl(var(--blue) 15 33);
background: hsl(var(--blue) 15% 33%);
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' viewBox='0 0 24 24'%3E%3Cpath d='M9 10h1a1 1 0 1 0 0-2H9a1 1 0 0 0 0 2Zm0 2a1 1 0 0 0 0 2h6a1 1 0 0 0 0-2H9Zm11-3V8l-6-6a1 1 0 0 0-1 0H7a3 3 0 0 0-3 3v14a3 3 0 0 0 3 3h10a3 3 0 0 0 3-3V9Zm-6-4 3 3h-2a1 1 0 0 1-1-1V5Zm4 14a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h5v3a3 3 0 0 0 3 3h3v9Zm-3-3H9a1 1 0 0 0 0 2h6a1 1 0 0 0 0-2Z'/%3E%3C/svg%3E")
center no-repeat;
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' viewBox='0 0 24 24'%3E%3Cpath d='M9 10h1a1 1 0 1 0 0-2H9a1 1 0 0 0 0 2Zm0 2a1 1 0 0 0 0 2h6a1 1 0 0 0 0-2H9Zm11-3V8l-6-6a1 1 0 0 0-1 0H7a3 3 0 0 0-3 3v14a3 3 0 0 0 3 3h10a3 3 0 0 0 3-3V9Zm-6-4 3 3h-2a1 1 0 0 1-1-1V5Zm4 14a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h5v3a3 3 0 0 0 3 3h3v9Zm-3-3H9a1 1 0 0 0 0 2h6a1 1 0 0 0 0-2Z'/%3E%3C/svg%3E")
@ -189,7 +147,7 @@
#qs_search .pagefind-ui__result-link {
position: unset;
--pagefind-ui-text: hsl(0 0 85);
--pagefind-ui-text: hsl(0deg 0% 85%);
font-weight: 600;
}
@ -197,9 +155,7 @@
text-decoration: none;
}
#qs_search
.pagefind-ui__result-nested
.pagefind-ui__result-link::before {
#qs_search .pagefind-ui__result-nested .pagefind-ui__result-link::before {
content: unset;
}
@ -209,7 +165,7 @@
inset-block: 0;
inset-inline-start: var(--search-tree-diagram-inline-start);
width: var(--search-tree-diagram-size);
background: hsl(var(--blue) 10 30);
background: hsl(var(--blue) 10% 30%);
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' viewBox='0 0 16 1000' preserveAspectRatio='xMinYMin slice'%3E%3Cpath d='M8 0v1000m6-988H8'/%3E%3C/svg%3E")
0% 0% / 100% no-repeat;
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' viewBox='0 0 16 1000' preserveAspectRatio='xMinYMin slice'%3E%3Cpath d='M8 0v1000m6-988H8'/%3E%3C/svg%3E")
@ -232,12 +188,10 @@
overflow-wrap: anywhere;
}
#qs_search
.pagefind-ui__result-inner
> .pagefind-ui__result-excerpt {
#qs_search .pagefind-ui__result-inner > .pagefind-ui__result-excerpt {
display: inline-block;
position: relative;
background: hsl(0 0 10);
background: hsl(0deg 0% 10%);
padding: var(--search-result-nested-pad-block)
var(--search-result-pad-inline-end);
padding-inline-start: var(--search-result-pad-inline-start);
@ -249,7 +203,7 @@
inset-block: 0;
inset-inline-start: var(--search-tree-diagram-inline-start);
width: var(--search-tree-diagram-size);
background: hsl(var(--blue) 10 30);
background: hsl(var(--blue) 10% 30%);
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' viewBox='0 0 16 1000' preserveAspectRatio='xMinYMin slice'%3E%3Cpath d='M8 0v1000m'/%3E%3C/svg%3E")
0% 0% / 100% no-repeat;
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' viewBox='0 0 16 1000' preserveAspectRatio='xMinYMin slice'%3E%3Cpath d='M8 0v1000m'/%3E%3C/svg%3E")
@ -258,17 +212,16 @@
}
#qs_search mark {
color: hsl(var(--blue) 15 60);
color: hsl(var(--blue) 15% 60%);
background-color: transparent;
font-weight: 600;
}
/* default styles */
site-search {
--shadow-lg: 0px 25px 7px hsla(0, 0%, 0%, 0.03), 0px 16px 6px
hsla(0, 0%, 0%, 0.1), 0px 9px 5px hsla(223, 13%, 10%, 0.33),
0px 4px 4px hsla(0, 0%, 0%, 0.75), 0px 4px 2px
hsla(0, 0%, 0%, 0.25);
--shadow-lg: 0px 25px 7px hsl(0deg, 0%, 0%, 0.03),
0px 16px 6px hsl(0deg, 0%, 0%, 0.1), 0px 9px 5px hsl(223deg, 13%, 10%, 0.33),
0px 4px 4px hsl(0deg, 0%, 0%, 0.75), 0px 4px 2px hsl(0deg, 0%, 0%, 0.25);
display: contents;
}
@ -303,10 +256,10 @@ button[data-open-modal] {
gap: 0.5rem;
border: 0;
background-color: transparent;
color: hsl(var(--blue) 40 65);
color: hsl(var(--blue) 40% 65%);
cursor: pointer;
height: 2.5rem;
font-size: 1.10rem;
font-size: 1.1rem;
& svg {
width: 21px;
@ -319,17 +272,17 @@ button > kbd {
font-size: 0.75rem;
gap: 0.25em;
padding-inline: 0.375rem;
background-color: hsla(var(--blue) 15 80);
background-color: hsl(var(--blue) 15% 80%);
}
html.dark button > kbd {
background-color: hsla(var(--blue) 5 20 / 0.5);
background-color: hsl(var(--blue) 5% 20% / 0.5);
}
dialog {
margin: 0;
background-color: hsl(var(--blue) 10 15);
border: 1px solid hsl(var(--blue) 15 25);
background-color: hsl(var(--blue) 10% 15%);
border: 1px solid hsl(var(--blue) 15% 25%);
width: 100%;
max-width: 100%;
height: 100%;
@ -342,7 +295,7 @@ dialog[open] {
}
dialog::backdrop {
background-color: hsla(var(--blue) 15 6 / 0.66);
background-color: hsl(var(--blue) 15% 6% / 0.66);
-webkit-backdrop-filter: blur(0.25rem);
backdrop-filter: blur(0.25rem);
}
@ -369,15 +322,15 @@ button[data-close-modal] {
#qs_search {
--pagefind-ui-primary: hsla(var(--accent-400));
--pagefind-ui-text: hsla(0 0 60);
--pagefind-ui-background: hsl(var(--blue) 10 15);
--pagefind-ui-border: hsl(var(--blue) 30 25);
--pagefind-ui-text: hsl(0deg 0% 60%);
--pagefind-ui-background: hsl(var(--blue) 10% 15%);
--pagefind-ui-border: hsl(var(--blue) 30% 25%);
--pagefind-ui-border-width: 1px;
--search-cancel-space: 5rem;
}
@media (min-width: 40rem) {
/* difault styles */
/* default styles */
.search-label {
display: block;
}
@ -397,15 +350,17 @@ button[data-close-modal] {
border-radius: 6px;
padding-inline-start: 0.75rem;
padding-inline-end: 0.5rem;
background-color: hsla(var(--blue) 15 90);
color: hsl(var(--blue) 40 45);
background-color: hsl(var(--blue) 15% 90%);
color: hsl(var(--blue) 40% 45%);
font-size: 0.875rem;
width: 100%;
max-width: 15rem;
transition: color 0.23s, border-color 0.23s;
transition:
color 0.23s,
border-color 0.23s;
&:hover {
color: hsl(var(--blue) 50 30);
color: hsl(var(--blue) 50% 30%);
}
& > :last-child {
@ -414,11 +369,11 @@ button[data-close-modal] {
}
html.dark button[data-open-modal] {
background-color: hsla(var(--blue) 15 15 / 0.5);
color: hsl(var(--blue) 40 65);
background-color: hsla(var(--blue) 15% 15% / 0.5);
color: hsl(var(--blue) 40% 65%);
&:hover {
color: hsl(var(--blue) 60 85);
color: hsl(var(--blue) 60% 85%);
}
}

View file

@ -1,7 +1,7 @@
.toc-wrapper-mobile .toc-content {
& .toc_a {
transition: color 0.33s;
color: hsl(var(--green) 72 40);
color: hsl(var(--green) 72% 40%);
}
& ul {
@ -13,7 +13,7 @@
&.active {
& > .toc_a {
color: hsl(var(--green) 72 60);
color: hsl(var(--green) 72% 60%);
}
}
}