mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-23 11:03:39 +00:00
Limit tinted background on bold theme to sites with filled sidebar (#3072)
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"gitbook": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Limit tinted background on bold theme to sites with filled sidebar
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@gitbook/colors": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Reduce chroma of first color scale step
|
||||||
@@ -220,7 +220,7 @@ export function colorScale(
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const chromaRatio = index < 8 ? (index + 1) * 0.05 : 1;
|
const chromaRatio = index < 8 ? index * 0.05 : 1;
|
||||||
|
|
||||||
const shade = {
|
const shade = {
|
||||||
L: targetL, // Blend lightness
|
L: targetL, // Blend lightness
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ const HINT_STYLES: {
|
|||||||
'[&_.can-override-text]:text-neutral-strong',
|
'[&_.can-override-text]:text-neutral-strong',
|
||||||
],
|
],
|
||||||
container:
|
container:
|
||||||
'bg-info border-info theme-muted-tint:bg-info-solid/2 theme-bold-tint:bg-info-solid/2',
|
'bg-info border-info theme-muted-tint:bg-info-solid/2 [html.sidebar-filled.theme-bold.tint_&]:bg-info-solid/2',
|
||||||
containerWithHeader: 'border-info-solid bg-info-subtle',
|
containerWithHeader: 'border-info-solid bg-info-subtle',
|
||||||
},
|
},
|
||||||
warning: {
|
warning: {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ export function Header(props: { context: GitBookSiteContext; withTopHeader?: boo
|
|||||||
|
|
||||||
'bg-tint-base/9',
|
'bg-tint-base/9',
|
||||||
'theme-muted:bg-tint-subtle/9',
|
'theme-muted:bg-tint-subtle/9',
|
||||||
'theme-bold-tint:bg-tint-subtle/9',
|
'[html.sidebar-filled.theme-bold.tint_&]:bg-tint-subtle/9',
|
||||||
'theme-gradient:bg-gradient-primary',
|
'theme-gradient:bg-gradient-primary',
|
||||||
'theme-gradient-tint:bg-gradient-tint',
|
'theme-gradient-tint:bg-gradient-tint',
|
||||||
'contrast-more:bg-tint-base',
|
'contrast-more:bg-tint-base',
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ export function PageAside(props: {
|
|||||||
) : null}
|
) : null}
|
||||||
<div
|
<div
|
||||||
className={tcls(
|
className={tcls(
|
||||||
'sticky bottom-0 z-10 mt-auto flex flex-col bg-tint-base theme-bold-tint:bg-tint-subtle theme-gradient-tint:bg-gradient-tint theme-gradient:bg-gradient-primary theme-muted:bg-tint-subtle pb-4 page-api-block:xl:max-2xl:hidden page-api-block:xl:max-2xl:pb-0 page-api-block:xl:max-2xl:group-hover/aside:flex',
|
'sticky bottom-0 z-10 mt-auto flex flex-col bg-tint-base theme-gradient-tint:bg-gradient-tint theme-gradient:bg-gradient-primary theme-muted:bg-tint-subtle pb-4 page-api-block:xl:max-2xl:hidden page-api-block:xl:max-2xl:pb-0 page-api-block:xl:max-2xl:group-hover/aside:flex [html.sidebar-filled.theme-bold.tint_&]:bg-tint-subtle',
|
||||||
'page-api-block:xl:max-2xl:bg-transparent'
|
'page-api-block:xl:max-2xl:bg-transparent'
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ export function ScrollSectionsList(props: { sections: DocumentSection[] }) {
|
|||||||
|
|
||||||
'hover:bg-primary-hover',
|
'hover:bg-primary-hover',
|
||||||
'theme-muted:hover:bg-primary-active',
|
'theme-muted:hover:bg-primary-active',
|
||||||
'theme-bold-tint:hover:bg-primary-active',
|
'[html.sidebar-filled.theme-bold.tint_&]:hover:bg-primary-active',
|
||||||
'theme-gradient:hover:bg-primary-active',
|
'theme-gradient:hover:bg-primary-active',
|
||||||
|
|
||||||
'tint:font-semibold',
|
'tint:font-semibold',
|
||||||
|
|||||||
@@ -153,9 +153,9 @@ export async function CustomizationRootLayout(props: {
|
|||||||
</head>
|
</head>
|
||||||
<body
|
<body
|
||||||
className={tcls(
|
className={tcls(
|
||||||
|
'[html.sidebar-filled.theme-bold.tint_&]:bg-tint-subtle',
|
||||||
'bg-tint-base',
|
'bg-tint-base',
|
||||||
'theme-muted:bg-tint-subtle',
|
'theme-muted:bg-tint-subtle',
|
||||||
'theme-bold-tint:bg-tint-subtle',
|
|
||||||
|
|
||||||
'theme-gradient:bg-gradient-primary',
|
'theme-gradient:bg-gradient-primary',
|
||||||
'theme-gradient-tint:bg-gradient-tint'
|
'theme-gradient-tint:bg-gradient-tint'
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export function SiteSectionList(props: { sections: ClientSiteSections; className
|
|||||||
<nav
|
<nav
|
||||||
aria-label="Sections"
|
aria-label="Sections"
|
||||||
className={tcls(
|
className={tcls(
|
||||||
'-mx-5 before:contents[] relative border-tint-subtle border-b from-transparent sidebar-filled:to-tint-subtle theme-bold-tint:to-tint-subtle theme-muted:to-tint-subtle to-tint-base text-sm text-tint before:pointer-events-none before:absolute before:right-2 before:bottom-0 before:left-0 before:h-12 before:bg-gradient-to-b [html.sidebar-filled.theme-bold.tint_&]:to-tint-base [html.sidebar-filled.theme-muted_&]:to-tint-base',
|
'-mx-5 before:contents[] relative border-tint-subtle border-b from-transparent sidebar-filled:to-tint-subtle theme-muted:to-tint-subtle to-tint-base text-sm text-tint before:pointer-events-none before:absolute before:right-2 before:bottom-0 before:left-0 before:h-12 before:bg-gradient-to-b [html.sidebar-filled.theme-bold.tint_&]:to-tint-base [html.sidebar-filled.theme-bold.tint_&]:to-tint-subtle [html.sidebar-filled.theme-muted_&]:to-tint-base',
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export function PageGroupItem(props: {
|
|||||||
'bg-tint-base',
|
'bg-tint-base',
|
||||||
'sidebar-filled:bg-tint-subtle',
|
'sidebar-filled:bg-tint-subtle',
|
||||||
'theme-muted:bg-tint-subtle',
|
'theme-muted:bg-tint-subtle',
|
||||||
'theme-bold-tint:bg-tint-subtle',
|
'[html.sidebar-filled.theme-bold.tint_&]:bg-tint-subtle',
|
||||||
'[html.sidebar-filled.theme-muted_&]:bg-tint-base',
|
'[html.sidebar-filled.theme-muted_&]:bg-tint-base',
|
||||||
'[html.sidebar-filled.theme-bold.tint_&]:bg-tint-base',
|
'[html.sidebar-filled.theme-bold.tint_&]:bg-tint-base',
|
||||||
'[html.sidebar-default.theme-gradient_&]:bg-gradient-primary',
|
'[html.sidebar-default.theme-gradient_&]:bg-gradient-primary',
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ export function TableOfContents(props: {
|
|||||||
|
|
||||||
'sidebar-filled:bg-tint-subtle',
|
'sidebar-filled:bg-tint-subtle',
|
||||||
'theme-muted:bg-tint-subtle',
|
'theme-muted:bg-tint-subtle',
|
||||||
'theme-bold-tint:bg-tint-subtle',
|
'[html.sidebar-filled.theme-bold.tint_&]:bg-tint-subtle',
|
||||||
'[html.sidebar-filled.theme-muted_&]:bg-tint-base',
|
'[html.sidebar-filled.theme-muted_&]:bg-tint-base',
|
||||||
'[html.sidebar-filled.theme-bold.tint_&]:bg-tint-base',
|
'[html.sidebar-filled.theme-bold.tint_&]:bg-tint-base',
|
||||||
'page-no-toc:!bg-transparent',
|
'page-no-toc:!bg-transparent',
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ export function Trademark(props: {
|
|||||||
'before:to-tint-base',
|
'before:to-tint-base',
|
||||||
'sidebar-filled:before:to-tint-subtle',
|
'sidebar-filled:before:to-tint-subtle',
|
||||||
'theme-muted:before:to-tint-subtle',
|
'theme-muted:before:to-tint-subtle',
|
||||||
'theme-bold-tint:before:to-tint-subtle',
|
'[html.sidebar-filled.theme-bold.tint_&]:before:to-tint-subtle',
|
||||||
'[html.sidebar-filled.theme-muted_&]:before:to-tint-base',
|
'[html.sidebar-filled.theme-muted_&]:before:to-tint-base',
|
||||||
'[html.sidebar-filled.theme-bold.tint_&]:before:to-tint-base',
|
'[html.sidebar-filled.theme-bold.tint_&]:before:to-tint-base',
|
||||||
'page-no-toc:before:!to-transparent'
|
'page-no-toc:before:!to-transparent'
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ function ThemeButton(props: {
|
|||||||
active && [
|
active && [
|
||||||
'bg-primary',
|
'bg-primary',
|
||||||
'theme-muted:bg-primary-hover',
|
'theme-muted:bg-primary-hover',
|
||||||
'theme-bold-tint:bg-primary-hover',
|
'[html.sidebar-filled.theme-bold.tint_&]:bg-primary-hover',
|
||||||
'hover:bg-primary',
|
'hover:bg-primary',
|
||||||
'text-primary-strong',
|
'text-primary-strong',
|
||||||
'contrast-more:text-primary-strong',
|
'contrast-more:text-primary-strong',
|
||||||
|
|||||||
Reference in New Issue
Block a user