@chassis-ui/docs 0.1.10 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/components/FeatureCard.astro +6 -6
- package/src/components/NavLink.astro +1 -1
- package/src/components/ThemeToggler.astro +1 -1
- package/src/components/shortcodes/Blockquote.astro +31 -0
- package/src/components/shortcodes/CSSOnly.astro +18 -0
- package/src/components/shortcodes/DeprecatedIn.astro +15 -0
- package/src/components/shortcodes/InFigma.astro +21 -0
- package/src/layouts/DocsLayout.astro +8 -8
- package/src/layouts/SingleLayout.astro +3 -3
- package/src/layouts/footer/Footer.astro +5 -5
- package/src/layouts/footer/Scripts.astro +6 -4
- package/src/layouts/header/Navigation.astro +22 -22
- package/src/layouts/header/Skippy.astro +1 -1
- package/src/scss/_callouts.scss +1 -1
- package/src/scss/_layout.scss +3 -1
- package/src/scss/_navbar.scss +2 -5
- package/src/scss/_sidebar.scss +1 -1
- package/src/scss/_toc.scss +1 -1
- package/src/scss/_variables.scss +6 -11
- package/src/scss/main.scss +1 -2
- package/src/scss/_masthead.scss +0 -124
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Shared Astro layouts, components, and utilities for Chassis documentation sites.
|
|
4
4
|
|
|
5
|
-
[](https://opensource.org/licenses/MIT) [](https://opensource.org/licenses/MIT) [](https://www.npmjs.com/package/@chassis-ui/docs) [](https://www.npmjs.com/package/@chassis-ui/docs)
|
|
6
6
|
|
|
7
7
|
## Overview
|
|
8
8
|
|
package/package.json
CHANGED
|
@@ -26,7 +26,7 @@ const hasContent = Astro.slots.has('default')
|
|
|
26
26
|
// Build class strings
|
|
27
27
|
const cardClasses = [
|
|
28
28
|
'feature-item bg-even d-flex flex-column rounded-large',
|
|
29
|
-
'p-medium p-
|
|
29
|
+
'p-medium large:p-xlarge gap-medium medium:gap-xlarge',
|
|
30
30
|
horizontal ? '' : 'h-100',
|
|
31
31
|
classes
|
|
32
32
|
]
|
|
@@ -35,8 +35,8 @@ const cardClasses = [
|
|
|
35
35
|
|
|
36
36
|
const headerClasses = [
|
|
37
37
|
'feature-header d-flex',
|
|
38
|
-
'gap-medium gap-
|
|
39
|
-
horizontal ? 'flex-column flex-
|
|
38
|
+
'gap-medium medium:gap-xlarge',
|
|
39
|
+
horizontal ? 'flex-column medium:flex-row' : 'flex-column'
|
|
40
40
|
].join(' ')
|
|
41
41
|
---
|
|
42
42
|
|
|
@@ -45,17 +45,17 @@ const headerClasses = [
|
|
|
45
45
|
{
|
|
46
46
|
icon && (
|
|
47
47
|
<div class="feature-thumb">
|
|
48
|
-
<svg class="icon feature-icon icon-3xlarge icon-
|
|
48
|
+
<svg class="icon feature-icon icon-3xlarge medium:icon-4xlarge" aria-hidden="true">
|
|
49
49
|
<use href={`#${icon}`} />
|
|
50
50
|
</svg>
|
|
51
51
|
</div>
|
|
52
52
|
)
|
|
53
53
|
}
|
|
54
54
|
<div>
|
|
55
|
-
<h3 class="feature-title font-large font-
|
|
55
|
+
<h3 class="feature-title font-large medium:font-xlarge mb-3xsmall medium:mb-2xsmall">
|
|
56
56
|
<slot name="title" />
|
|
57
57
|
</h3>
|
|
58
|
-
<p class="feature-body font-
|
|
58
|
+
<p class="feature-body medium:font-large mb-0">
|
|
59
59
|
<slot name="body" />
|
|
60
60
|
</p>
|
|
61
61
|
</div>
|
|
@@ -21,7 +21,7 @@ interface Props {
|
|
|
21
21
|
const { active, class: className, ...props } = Astro.props
|
|
22
22
|
---
|
|
23
23
|
|
|
24
|
-
<li class="nav-item col-6 col-
|
|
24
|
+
<li class="nav-item col-6 large:col-auto">
|
|
25
25
|
<a
|
|
26
26
|
aria-current={active ? true : undefined}
|
|
27
27
|
class:list={['nav-link', className, { active }]}
|
|
@@ -26,7 +26,7 @@ const { layout } = Astro.props
|
|
|
26
26
|
>
|
|
27
27
|
<svg class="icon theme-icon-active" aria-hidden="true"><use href="#circle-half-solid"></use></svg>
|
|
28
28
|
<span
|
|
29
|
-
class=`${layout === 'examples' ? 'visually-hidden' : 'd-
|
|
29
|
+
class=`${layout === 'examples' ? 'visually-hidden' : 'large:d-none ms-xsmall'}`
|
|
30
30
|
id="cxd-theme-text">Toggle theme</span
|
|
31
31
|
>
|
|
32
32
|
</button>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* Blockquote
|
|
4
|
+
*
|
|
5
|
+
* Render a blockquote with optional attribution.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
/** Attribution text or HTML for the quote */
|
|
10
|
+
attr?: String
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { attr } = Astro.props
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
{
|
|
17
|
+
attr ? (
|
|
18
|
+
<figure>
|
|
19
|
+
<blockquote class="blockquote">
|
|
20
|
+
<slot />
|
|
21
|
+
</blockquote>
|
|
22
|
+
<figcaption class="attribution">
|
|
23
|
+
<Fragment set:html={attr} />
|
|
24
|
+
</figcaption>
|
|
25
|
+
</figure>
|
|
26
|
+
) : (
|
|
27
|
+
<blockquote class="blockquote">
|
|
28
|
+
<slot />
|
|
29
|
+
</blockquote>
|
|
30
|
+
)
|
|
31
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
/*
|
|
3
|
+
* Outputs badge to identify features that are only available in CSS and not in Figma
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
tooltip?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { tooltip = 'This feature is only available in CSS and not in Figma components.' } =
|
|
11
|
+
Astro.props
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<span
|
|
15
|
+
class="badge large info smooth mb-medium rounded-medium"
|
|
16
|
+
data-cx-toggle="tooltip"
|
|
17
|
+
title={tooltip}>CSS Only</span
|
|
18
|
+
>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
/*
|
|
3
|
+
* Outputs badge to identify the version something was deprecated
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
version: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { version } = Astro.props
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<span class="badge large warning smooth mb-medium rounded-medium">
|
|
14
|
+
Deprecated in v{version}
|
|
15
|
+
</span>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
/*
|
|
3
|
+
* Outputs badge to identify features that are only available in CSS and not in Figma
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
tooltip?: string
|
|
8
|
+
plural?: boolean
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const { tooltip, plural } = Astro.props
|
|
12
|
+
const tooltipText =
|
|
13
|
+
tooltip ??
|
|
14
|
+
`This variant${plural ? 's' : ''} exist${plural ? '' : 's'} in the Figma component library with bound design tokens.`
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
<span
|
|
18
|
+
class="badge large primary smooth mb-medium rounded-medium"
|
|
19
|
+
data-cx-toggle="tooltip"
|
|
20
|
+
title={tooltipText}>In Figma</span
|
|
21
|
+
>
|
|
@@ -42,10 +42,10 @@ if (frontmatter.toc) {
|
|
|
42
42
|
---
|
|
43
43
|
|
|
44
44
|
<BaseLayout {...Astro.props} layout="docs" overrides={{ body: bodyProps }}>
|
|
45
|
-
<div slot="main" class="container
|
|
45
|
+
<div slot="main" class="container fluid cxd-gutter cxd-layout">
|
|
46
46
|
<aside class="cxd-sidebar">
|
|
47
47
|
<div
|
|
48
|
-
class="offcanvas
|
|
48
|
+
class="large:offcanvas offcanvas-start"
|
|
49
49
|
role="dialog"
|
|
50
50
|
tabindex="-1"
|
|
51
51
|
id="cxdSidebar"
|
|
@@ -73,9 +73,9 @@ if (frontmatter.toc) {
|
|
|
73
73
|
<div class="cxd-intro">
|
|
74
74
|
<slot name="intro">
|
|
75
75
|
<div
|
|
76
|
-
class="d-
|
|
76
|
+
class="medium:d-flex medium:flex-row-reverse justify-content-between align-items-start"
|
|
77
77
|
>
|
|
78
|
-
<div class="mb-medium mb-
|
|
78
|
+
<div class="mb-medium medium:mb-0 d-flex text-nowrap">
|
|
79
79
|
{
|
|
80
80
|
// This is needed because we want to show the badge if show_badge isn't present or is set to false
|
|
81
81
|
frontmatter.added &&
|
|
@@ -113,7 +113,7 @@ if (frontmatter.toc) {
|
|
|
113
113
|
frontmatter.toc && headings && (
|
|
114
114
|
<div class="cxd-toc">
|
|
115
115
|
<button
|
|
116
|
-
class="button default mb-large text-decoration-none cxd-toc-toggle d-
|
|
116
|
+
class="button default mb-large text-decoration-none cxd-toc-toggle medium:d-none"
|
|
117
117
|
type="button"
|
|
118
118
|
data-cx-toggle="collapse"
|
|
119
119
|
data-cx-target="#tocContents"
|
|
@@ -125,8 +125,8 @@ if (frontmatter.toc) {
|
|
|
125
125
|
<use xlink:href="#chevron-sort-solid" />
|
|
126
126
|
</svg>
|
|
127
127
|
</button>
|
|
128
|
-
<strong class="d-none d-
|
|
129
|
-
<hr class="d-none d-
|
|
128
|
+
<strong class="d-none medium:d-block h6 my-xsmall">On this page</strong>
|
|
129
|
+
<hr class="d-none medium:d-block my-xsmall" />
|
|
130
130
|
<div class="collapse cxd-toc-collapse" id="tocContents">
|
|
131
131
|
<nav id="TableOfContents">
|
|
132
132
|
<slot name="toc">
|
|
@@ -143,7 +143,7 @@ if (frontmatter.toc) {
|
|
|
143
143
|
frontmatter.sections && (
|
|
144
144
|
<div class="row g-xlarge">
|
|
145
145
|
{frontmatter.sections.map((section: DocSection) => (
|
|
146
|
-
<div class="col-
|
|
146
|
+
<div class="medium:col-6">
|
|
147
147
|
<a
|
|
148
148
|
class="d-block text-decoration-none"
|
|
149
149
|
href={getChassisDocsPath(
|
|
@@ -22,10 +22,10 @@ mainProps['class'] = 'min-vh-100'
|
|
|
22
22
|
---
|
|
23
23
|
|
|
24
24
|
<BaseLayout {...Astro.props} layout="single" overrides={{ main: mainProps }}>
|
|
25
|
-
<header class="py-xlarge py-
|
|
26
|
-
<div class="container
|
|
25
|
+
<header class="py-xlarge medium:py-3xlarge border-bottom border-subtle">
|
|
26
|
+
<div class="container 2xlarge">
|
|
27
27
|
<div class="row">
|
|
28
|
-
<div class="col col-
|
|
28
|
+
<div class="col large:col-10 2xlarge:col-8">
|
|
29
29
|
<h1 class="mt-0">{title}</h1>
|
|
30
30
|
<p class="font-lead">{description}</p>
|
|
31
31
|
<slot name="header-content" />
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
<footer class="cxd-footer py-6xlarge">
|
|
10
|
-
<div class="container
|
|
10
|
+
<div class="container 2xlarge fg-subtle">
|
|
11
11
|
<div class="row">
|
|
12
|
-
<div class="col-
|
|
12
|
+
<div class="medium:col-10 large:col-5 mb-medium">
|
|
13
13
|
<a
|
|
14
14
|
class="d-inline-flex align-items-center mb-xsmall text-body-emphasis text-decoration-none"
|
|
15
15
|
href="/"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
and distribution of the software.
|
|
23
23
|
</p>
|
|
24
24
|
</div>
|
|
25
|
-
<div class="col-
|
|
25
|
+
<div class="small:col-4 large:col-2 large:offset-1 mb-medium">
|
|
26
26
|
<p class="h6 mb-xsmall">Docs</p>
|
|
27
27
|
<ul class="nav">
|
|
28
28
|
<li><a href="/tokens">Design Tokens</a></li>
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
<li><a href="/icons">Icon Generator</a></li>
|
|
33
33
|
</ul>
|
|
34
34
|
</div>
|
|
35
|
-
<div class="col-
|
|
35
|
+
<div class="small:col-4 large:col-2 mb-medium">
|
|
36
36
|
<p class="h6 mb-xsmall">Github</p>
|
|
37
37
|
<ul class="nav">
|
|
38
38
|
<li><a href="https://github.com/chassis-ui/tokens">Chassis Tokens</a></li>
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
<li><a href="https://github.com/chassis-ui/icons">Chassis Icons</a></li>
|
|
43
43
|
</ul>
|
|
44
44
|
</div>
|
|
45
|
-
<div class="col-
|
|
45
|
+
<div class="small:col-4 large:col-2 mb-medium">
|
|
46
46
|
<p class="h6 mb-xsmall">Project</p>
|
|
47
47
|
<ul class="nav">
|
|
48
48
|
<li><a href="/about">About</a></li>
|
|
@@ -17,11 +17,13 @@ const { layout } = Astro.props
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
19
|
<script is:inline {...getChassisJsProps()}></script>
|
|
20
|
-
|
|
21
20
|
<script src="../../js/search.js"></script>
|
|
22
|
-
|
|
21
|
+
<script>
|
|
22
|
+
const tooltipTriggerList = document.querySelectorAll('[data-cx-toggle="tooltip"]')
|
|
23
|
+
const tooltipList = [...tooltipTriggerList].map(
|
|
24
|
+
(tooltipTriggerEl) => new chassis.Tooltip(tooltipTriggerEl)
|
|
25
|
+
)
|
|
26
|
+
</script>
|
|
23
27
|
{layout === 'docs' && <script src="../../js/sidebar.js" />}
|
|
24
|
-
|
|
25
28
|
<script src="../../js/icon-loader.js"></script>
|
|
26
|
-
|
|
27
29
|
<slot name="scripts" />
|
|
@@ -31,8 +31,8 @@ const isActive = (path: string) => {
|
|
|
31
31
|
}
|
|
32
32
|
---
|
|
33
33
|
|
|
34
|
-
<header class="navbar navbar-expand
|
|
35
|
-
<nav class="container
|
|
34
|
+
<header class="navbar large:navbar-expand cxd-navbar sticky-top">
|
|
35
|
+
<nav class="container 2xlarge" aria-label="Main navigation">
|
|
36
36
|
{
|
|
37
37
|
layout === 'docs' && (
|
|
38
38
|
<div class="cxd-navbar-toggle">
|
|
@@ -47,14 +47,14 @@ const isActive = (path: string) => {
|
|
|
47
47
|
<svg class="icon icon-large" aria-hidden="true">
|
|
48
48
|
<use href="#bars-solid" />
|
|
49
49
|
</svg>
|
|
50
|
-
<span class="d-none fs-6 pe-2xsmall">Browse</span>
|
|
50
|
+
<span class="d-none large:d-inline fs-6 pe-2xsmall">Browse</span>
|
|
51
51
|
</button>
|
|
52
52
|
</div>
|
|
53
53
|
)
|
|
54
54
|
}
|
|
55
|
-
{layout !== 'docs' && <div class="d-
|
|
55
|
+
{layout !== 'docs' && <div class="large:d-none" style="width: 4.25rem;" />}
|
|
56
56
|
|
|
57
|
-
<a class="navbar-brand me-
|
|
57
|
+
<a class="navbar-brand large:me-medium" href="/" aria-label="Chassis">
|
|
58
58
|
<img src="/static/images/site-logo.svg" alt="Chassis UI" width="123" height="32" />
|
|
59
59
|
</a>
|
|
60
60
|
|
|
@@ -62,7 +62,7 @@ const isActive = (path: string) => {
|
|
|
62
62
|
<div class="cxd-search" id="docsearch"></div>
|
|
63
63
|
|
|
64
64
|
<button
|
|
65
|
-
class="navbar-toggler d-flex d-
|
|
65
|
+
class="navbar-toggler d-flex large:d-none order-3 p-xsmall"
|
|
66
66
|
type="button"
|
|
67
67
|
data-cx-toggle="offcanvas"
|
|
68
68
|
data-cx-target="#cxdNavbar"
|
|
@@ -74,7 +74,7 @@ const isActive = (path: string) => {
|
|
|
74
74
|
</div>
|
|
75
75
|
|
|
76
76
|
<div
|
|
77
|
-
class="offcanvas
|
|
77
|
+
class="offcanvas large:offcanvas offcanvas-end flex-grow-1"
|
|
78
78
|
role="dialog"
|
|
79
79
|
tabindex="-1"
|
|
80
80
|
id="cxdNavbar"
|
|
@@ -90,45 +90,45 @@ const isActive = (path: string) => {
|
|
|
90
90
|
data-cx-target="#cxdNavbar"></button>
|
|
91
91
|
</div>
|
|
92
92
|
|
|
93
|
-
<div class="offcanvas-body p-large pt-0 p-
|
|
94
|
-
<hr class="d-
|
|
95
|
-
<ul class="navbar-nav flex-row flex-wrap cxd-navbar-nav mx-0 mx-
|
|
93
|
+
<div class="offcanvas-body p-large pt-0 large:p-0">
|
|
94
|
+
<hr class="large:d-none" />
|
|
95
|
+
<ul class="navbar-nav flex-row flex-wrap cxd-navbar-nav mx-0 large:mx-medium">
|
|
96
96
|
<NavLink active={isActive('/tokens')} href="/tokens">Tokens</NavLink>
|
|
97
97
|
<NavLink active={isActive('/figma')} href="/figma">Figma</NavLink>
|
|
98
98
|
<NavLink active={isActive('/css')} href="/css">CSS</NavLink>
|
|
99
99
|
<NavLink active={isActive('/assets')} href="/assets">Assets</NavLink>
|
|
100
100
|
<NavLink active={isActive('/icons')} href="/icons">Icons</NavLink>
|
|
101
|
-
<li class="nav-item col-12 col-
|
|
102
|
-
<div class="vr d-none d-
|
|
103
|
-
<hr class="d-
|
|
101
|
+
<li class="nav-item col-12 large:col-auto large:d-flex">
|
|
102
|
+
<div class="vr d-none large:d-flex my-auto large:mx-2"></div>
|
|
103
|
+
<hr class="large:d-none" />
|
|
104
104
|
</li>
|
|
105
105
|
<NavLink active={isActive('/examples')} href="/examples">Examples</NavLink>
|
|
106
106
|
</ul>
|
|
107
107
|
|
|
108
|
-
<hr class="d-
|
|
108
|
+
<hr class="large:d-none" />
|
|
109
109
|
|
|
110
|
-
<ul class="navbar-nav flex-row flex-wrap ms-
|
|
110
|
+
<ul class="navbar-nav flex-row flex-wrap medium:ms-auto align-items-center">
|
|
111
111
|
<NavLink
|
|
112
|
-
class="nav-link px-0 px-
|
|
112
|
+
class="nav-link px-0 large:px-2"
|
|
113
113
|
href={getConfig().github_org}
|
|
114
114
|
target="_blank"
|
|
115
115
|
rel="noopener"
|
|
116
116
|
>
|
|
117
117
|
<svg class="icon"><title>GitHub</title><use href="#github-brand"></use></svg>
|
|
118
|
-
<small class="d-
|
|
118
|
+
<small class="large:d-none ms-xsmall">GitHub</small>
|
|
119
119
|
</NavLink>
|
|
120
120
|
<NavLink
|
|
121
|
-
class="nav-link px-0 px-
|
|
121
|
+
class="nav-link px-0 large:px-2"
|
|
122
122
|
href={`https://x.com/${getConfig().x}`}
|
|
123
123
|
target="_blank"
|
|
124
124
|
rel="noopener"
|
|
125
125
|
>
|
|
126
126
|
<svg class="icon"><title>X</title><use href="#x-twitter-brand"></use></svg>
|
|
127
|
-
<small class="d-
|
|
127
|
+
<small class="large:d-none ms-xsmall">X</small>
|
|
128
128
|
</NavLink>
|
|
129
|
-
<li class="nav-item col-12 col-
|
|
130
|
-
<div class="vr d-none d-
|
|
131
|
-
<hr class="d-
|
|
129
|
+
<li class="nav-item col-12 large:col-auto">
|
|
130
|
+
<div class="vr d-none large:d-flex h-100 large:mx-2"></div>
|
|
131
|
+
<hr class="large:d-none" />
|
|
132
132
|
</li>
|
|
133
133
|
|
|
134
134
|
<li class="nav-item dropdown">
|
|
@@ -16,7 +16,7 @@ const { layout } = Astro.props
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
18
|
<div class="skippy visually-hidden-focusable overflow-hidden">
|
|
19
|
-
<div class="container
|
|
19
|
+
<div class="container xlarge">
|
|
20
20
|
<a class="d-inline-flex p-xsmall m-xsmall" href="#content">Skip to main content</a>
|
|
21
21
|
{
|
|
22
22
|
layout === 'docs' && (
|
package/src/scss/_callouts.scss
CHANGED
package/src/scss/_layout.scss
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
.cxd-intro {
|
|
25
25
|
grid-area: intro;
|
|
26
|
+
width: 100%;
|
|
26
27
|
max-width: 960px;
|
|
27
28
|
margin: 2rem auto 0;
|
|
28
29
|
}
|
|
@@ -61,9 +62,10 @@
|
|
|
61
62
|
|
|
62
63
|
.cxd-content {
|
|
63
64
|
grid-area: content;
|
|
65
|
+
justify-self: center;
|
|
66
|
+
width: 100%;
|
|
64
67
|
min-width: 1px; // Fix width when cxd-content contains a `<pre>` https://github.com/chassis-ui/css/issues/25410
|
|
65
68
|
max-width: 960px;
|
|
66
|
-
margin: 0 auto;
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
// .cxd-content,
|
package/src/scss/_navbar.scss
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// box-shadow: 0 .5rem 1rem rgba($black, .15), inset 0 -1px 0 rgba($white, .15);
|
|
3
3
|
padding: 0;
|
|
4
4
|
// padding: .75rem 0;
|
|
5
|
-
background-color:
|
|
5
|
+
background-color: to-opacity(var(--cx-bg-main), var(--cx-opacity-dim-main));
|
|
6
6
|
backdrop-filter: blur(24px);
|
|
7
7
|
border-bottom: var(--cx-border-width-medium) solid var(--cx-border-subtle);
|
|
8
8
|
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
z-index: -1;
|
|
17
17
|
display: block;
|
|
18
18
|
content: "";
|
|
19
|
-
// background-image: linear-gradient(rgba(var(--cxd-subtle-rgb), 1), rgba(var(--cxd-subtle-rgb), .95));
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
.cxd-navbar-toggle {
|
|
@@ -81,7 +80,7 @@
|
|
|
81
80
|
vertical-align: -.125rem;
|
|
82
81
|
}
|
|
83
82
|
|
|
84
|
-
|
|
83
|
+
.#{large\:}offcanvas {
|
|
85
84
|
background-color: var(--cxd-subtle-bg);
|
|
86
85
|
border-left: 0;
|
|
87
86
|
|
|
@@ -101,8 +100,6 @@
|
|
|
101
100
|
--cx-dropdown-min-width: 12rem;
|
|
102
101
|
--cx-dropdown-padding-x: .25rem;
|
|
103
102
|
--cx-dropdown-padding-y: .25rem;
|
|
104
|
-
--cx-dropdown-link-hover-bg: rgba(var(--cxd-subtle-rgb), .1);
|
|
105
|
-
--cx-dropdown-link-active-bg: rgba(var(--cxd-subtle-rgb), 1);
|
|
106
103
|
@include rfs(.875rem, --cx-dropdown-font-size);
|
|
107
104
|
@include font-size(.875rem);
|
|
108
105
|
@include border-radius(.5rem);
|
package/src/scss/_sidebar.scss
CHANGED
package/src/scss/_toc.scss
CHANGED
package/src/scss/_variables.scss
CHANGED
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
// $cxd-main: $primary-base-color;
|
|
3
3
|
// $cxd-subtle: lighten(saturate($cxd-main, 5%), 15%); // stylelint-disable-line function-disallowed-list
|
|
4
4
|
// $cxd-main-light: lighten(saturate($cxd-main, 5%), 45%); // stylelint-disable-line function-disallowed-list
|
|
5
|
-
// $cxd-accent: $secondary-base-color;
|
|
6
5
|
$cxd-main: var(--cx-primary-base-color);
|
|
7
|
-
$cxd-subtle: var(--cx-primary-
|
|
6
|
+
$cxd-subtle: var(--cx-primary-40);
|
|
8
7
|
$cxd-main-light: var(--cx-primary-fg-main);
|
|
9
8
|
$cxd-accent: var(--cx-primary-base-color);
|
|
10
9
|
|
|
@@ -15,30 +14,26 @@ $cxd-callout-variants: info, warning, danger, default !default;
|
|
|
15
14
|
[data-cx-theme="light"] {
|
|
16
15
|
--cxd-main: #{$cxd-main};
|
|
17
16
|
--cxd-subtle: #{$cxd-subtle};
|
|
18
|
-
--cxd-accent: #{$cxd-accent};
|
|
19
|
-
--cxd-main-rgb: var(--cx-primary-base-color-rgb);
|
|
20
|
-
--cxd-subtle-rgb: var(--cx-primary-40-rgb);
|
|
21
|
-
--cxd-accent-rgb: var(--cx-secondary-base-color-rgb);
|
|
22
17
|
--cxd-pink-rgb: #{to-rgb($pink-500)};
|
|
23
18
|
--cxd-teal-rgb: #{to-rgb($teal-500)};
|
|
24
19
|
--cxd-main-bg: var(--cxd-main);
|
|
25
20
|
--cxd-subtle-bg: var(--cxd-subtle);
|
|
26
21
|
--cxd-toc-color: var(--cxd-main);
|
|
27
22
|
--cxd-sidebar-link-bg: var(--cx-bg-highlight);
|
|
28
|
-
--cxd-callout-link: #{to-
|
|
29
|
-
--cxd-callout-code-color: #{$pink-600};
|
|
23
|
+
--cxd-callout-link: #{to-color($blue-600)};
|
|
24
|
+
--cxd-callout-code-color: #{to-color($pink-600)};
|
|
30
25
|
// --cxd-pre-bg: var(--cx-bg-even);
|
|
31
26
|
}
|
|
32
27
|
|
|
33
28
|
@if $enable-dark-mode {
|
|
34
29
|
@include color-mode(dark, true) {
|
|
35
30
|
color-scheme: dark;
|
|
36
|
-
--cxd-subtle: var(--cx-primary-60
|
|
31
|
+
--cxd-subtle: var(--cx-primary-60);
|
|
37
32
|
--cxd-subtle-bg: #{$cxd-subtle};
|
|
38
33
|
// --cxd-toc-color: var(--#{$prefix}fg-subtle);
|
|
39
34
|
--cxd-sidebar-link-bg: var(--cx-primary-40);
|
|
40
|
-
--cxd-callout-link: #{to-
|
|
41
|
-
--cxd-callout-code-color: #{$pink-300};
|
|
35
|
+
--cxd-callout-link: #{to-color($blue-300)};
|
|
36
|
+
--cxd-callout-code-color: #{to-color($pink-300)};
|
|
42
37
|
//--cxd-pre-bg: #{adjust-color($gray-900, $lightness: -2.5%)}; // stylelint-disable-line scss/at-function-named-arguments
|
|
43
38
|
--cxd-pre-bg: var(--cx-bg-evident);
|
|
44
39
|
}
|
package/src/scss/main.scss
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
@import "fonts";
|
|
6
6
|
|
|
7
7
|
@import "navbar";
|
|
8
|
-
// @import "masthead";
|
|
9
8
|
@import "content";
|
|
10
9
|
@import "skippy";
|
|
11
10
|
@import "sidebar";
|
|
@@ -42,7 +41,7 @@
|
|
|
42
41
|
|
|
43
42
|
.docs-body .navbar,
|
|
44
43
|
.docs-body .cxd-footer {
|
|
45
|
-
.container
|
|
44
|
+
.container.#{\32 xlarge} {
|
|
46
45
|
max-width: 100%;
|
|
47
46
|
}
|
|
48
47
|
.cxd-search {
|
package/src/scss/_masthead.scss
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
.cxd-masthead {
|
|
2
|
-
--cxd-pink-rgb: #{to-rgb($pink)};
|
|
3
|
-
padding: 3rem 0;
|
|
4
|
-
// stylelint-disable
|
|
5
|
-
background-image: linear-gradient(180deg, rgba(var(--cx-bg-main-rgb), .01), rgba(var(--cx-bg-main-rgb), 1) 85%),
|
|
6
|
-
radial-gradient(ellipse at top left, rgba(var(--cx-primary-rgb), .25), transparent 50%),
|
|
7
|
-
radial-gradient(ellipse at top right, rgba(var(--cx-secondary-rgb), .25), transparent 50%),
|
|
8
|
-
radial-gradient(ellipse at center right, rgba(var(--cx-secondary-rgb), .25), transparent 50%),
|
|
9
|
-
radial-gradient(ellipse at center left, rgba(var(--cx-secondary-rgb), .25), transparent 50%);
|
|
10
|
-
// stylelint-enable
|
|
11
|
-
|
|
12
|
-
h1 {
|
|
13
|
-
--cx-heading-color: var(--cx-fg-color);
|
|
14
|
-
@include font-size(4rem);
|
|
15
|
-
line-height: 1.25em;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.lead {
|
|
19
|
-
@include font-size(1rem);
|
|
20
|
-
font-family: var(--cx-font-family-display);
|
|
21
|
-
font-weight: 400;
|
|
22
|
-
line-height: 1.5em;
|
|
23
|
-
color: var(--cx-fg-subtle);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.cxd-code-snippet {
|
|
27
|
-
width: 24rem;
|
|
28
|
-
margin: 0;
|
|
29
|
-
text-align: left;
|
|
30
|
-
border-color: var(--cx-border-subtle);
|
|
31
|
-
border-width: 1px;
|
|
32
|
-
@include border-radius(.5rem);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// .highlight {
|
|
36
|
-
// width: 100%;
|
|
37
|
-
// padding: .5rem 1rem;
|
|
38
|
-
// overflow: hidden;
|
|
39
|
-
// text-overflow: ellipsis;
|
|
40
|
-
// white-space: nowrap;
|
|
41
|
-
// background-color: rgba(var(--cx-fg-color-rgb), .075);
|
|
42
|
-
// @include border-radius(calc(.5rem - 1px));
|
|
43
|
-
|
|
44
|
-
// @include media-breakpoint-up(large) {
|
|
45
|
-
// padding-right: 4rem;
|
|
46
|
-
// }
|
|
47
|
-
|
|
48
|
-
// pre {
|
|
49
|
-
// padding: 0;
|
|
50
|
-
// margin: .625rem 0;
|
|
51
|
-
// overflow: hidden;
|
|
52
|
-
// }
|
|
53
|
-
// }
|
|
54
|
-
// .button-clipboard {
|
|
55
|
-
// position: absolute;
|
|
56
|
-
// top: -.625rem;
|
|
57
|
-
// right: 0;
|
|
58
|
-
// background-color: transparent;
|
|
59
|
-
// }
|
|
60
|
-
|
|
61
|
-
#carbonads { // stylelint-disable-line selector-max-id
|
|
62
|
-
margin-inline: auto;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
@include media-breakpoint-up(medium) {
|
|
66
|
-
.lead {
|
|
67
|
-
@include font-size(1.5rem);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.masthead-followup {
|
|
73
|
-
h2,
|
|
74
|
-
h3,
|
|
75
|
-
h4 {
|
|
76
|
-
--cx-heading-color: var(--cx-fg-color);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.lead {
|
|
80
|
-
@include font-size(1rem);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
@include media-breakpoint-up(medium) {
|
|
84
|
-
.lead {
|
|
85
|
-
@include font-size(1.25rem);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.masthead-followup-icon {
|
|
91
|
-
padding: 1rem;
|
|
92
|
-
color: rgba(var(--bg-rgb), 1);
|
|
93
|
-
background-color: rgba(var(--bg-rgb), .1);
|
|
94
|
-
background-blend-mode: multiple;
|
|
95
|
-
@include border-radius(1rem);
|
|
96
|
-
mix-blend-mode: darken;
|
|
97
|
-
|
|
98
|
-
svg {
|
|
99
|
-
filter: drop-shadow(0 1px 1px var(--cx-bg-color));
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.masthead-notice {
|
|
104
|
-
background-color: var(--cxd-accent);
|
|
105
|
-
box-shadow: inset 0 -1px 1px rgba(var(--cx-fg-color-rgb), .15), 0 .25rem 1.5rem rgba(var(--cx-bg-color-rgb), .75);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.animate-image {
|
|
109
|
-
> img {
|
|
110
|
-
@include transition(transform .2s ease-in-out);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
&:hover > img {
|
|
114
|
-
transform: scale(1.1);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
@if $enable-dark-mode {
|
|
119
|
-
[data-cx-theme="dark"] {
|
|
120
|
-
.masthead-followup-icon {
|
|
121
|
-
mix-blend-mode: lighten;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|