@chassis-ui/docs 0.1.10 → 0.3.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 +16 -16
- package/index.ts +6 -1
- package/package.json +20 -8
- package/src/components/DocsSidebar.astro +63 -23
- package/src/components/FeatureCard.astro +8 -8
- package/src/components/NavLink.astro +1 -1
- package/src/components/TableOfContents.astro +8 -7
- package/src/components/ThemeToggler.astro +16 -37
- package/src/components/shortcodes/Blockquote.astro +31 -0
- package/src/components/shortcodes/CSSOnly.astro +22 -0
- package/src/components/shortcodes/Callout.astro +6 -2
- package/src/components/shortcodes/Code.astro +289 -0
- package/src/components/shortcodes/DeprecatedIn.astro +18 -0
- package/src/components/shortcodes/Example.astro +132 -0
- package/src/components/shortcodes/Icon.astro +57 -0
- package/src/components/shortcodes/InFigma.astro +26 -0
- package/src/components/shortcodes/JsDocs.astro +64 -0
- package/src/components/shortcodes/Placeholder.astro +28 -0
- package/src/components/shortcodes/ResizableExample.astro +126 -0
- package/src/components/shortcodes/ScssDocs.astro +108 -0
- package/src/components/shortcodes/ScssDocsSimple.astro +66 -0
- package/src/js/color-modes.js +3 -3
- package/src/js/example-mode.js +75 -0
- package/src/js/search.js +501 -39
- package/src/js/theme-color.js +1 -1
- package/src/layouts/DocsLayout.astro +18 -21
- package/src/layouts/RedirectLayout.astro +1 -0
- package/src/layouts/SingleLayout.astro +3 -3
- package/src/layouts/footer/Footer.astro +5 -5
- package/src/layouts/footer/Scripts.astro +14 -7
- package/src/layouts/head/Analytics.astro +12 -6
- package/src/layouts/head/Favicons.astro +0 -2
- package/src/layouts/head/Head.astro +2 -7
- package/src/layouts/head/Stylesheet.astro +18 -11
- package/src/layouts/header/Header.astro +2 -5
- package/src/layouts/header/Navigation.astro +40 -42
- package/src/layouts/header/SearchDialog.astro +74 -0
- package/src/layouts/header/SearchTrigger.astro +41 -0
- package/src/layouts/header/Skippy.astro +1 -1
- package/src/libs/highlight.ts +91 -0
- package/src/libs/icon.ts +75 -0
- package/src/libs/image.ts +12 -1
- package/src/libs/layout.ts +18 -0
- package/src/libs/markdown.ts +128 -0
- package/src/libs/placeholder.ts +250 -0
- package/src/libs/rehype.ts +0 -17
- package/src/libs/shortcodes.ts +129 -0
- package/src/libs/site.ts +95 -0
- package/src/libs/toc.ts +40 -6
- package/src/libs/utils.ts +34 -82
- package/src/libs/vite.ts +45 -0
- package/src/scss/_anchor.scss +20 -16
- package/src/scss/_callouts.scss +29 -28
- package/src/scss/_content.scss +72 -103
- package/src/scss/_footer.scss +18 -19
- package/src/scss/_layout.scss +56 -61
- package/src/scss/_navbar.scss +19 -126
- package/src/scss/_placeholder-img.scss +11 -7
- package/src/scss/_scrolling.scss +14 -12
- package/src/scss/_search.scss +418 -0
- package/src/scss/_shiki.scss +120 -0
- package/src/scss/_sidebar.scss +137 -132
- package/src/scss/_skippy.scss +6 -4
- package/src/scss/_snippets.scss +181 -0
- package/src/scss/_toc.scss +97 -93
- package/src/scss/_vars.scss +89 -0
- package/src/scss/main.scss +75 -81
- package/src/js/icon-loader.js +0 -229
- package/src/libs/chassis.ts +0 -38
- package/src/scss/_brand.scss +0 -59
- package/src/scss/_buttons.scss +0 -33
- package/src/scss/_clipboard-js.scss +0 -63
- package/src/scss/_code.scss +0 -116
- package/src/scss/_colors.scss +0 -140
- package/src/scss/_docsearch.scss +0 -212
- package/src/scss/_masthead.scss +0 -124
- package/src/scss/_settings.scss +0 -29
- package/src/scss/_syntax.scss +0 -160
- package/src/scss/_variables.scss +0 -78
package/src/scss/_docsearch.scss
DELETED
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
// stylelint-disable selector-class-pattern
|
|
2
|
-
|
|
3
|
-
:root {
|
|
4
|
-
/* Colors */
|
|
5
|
-
--docsearch-primary-color: var(--cx-primary);
|
|
6
|
-
--docsearch-soft-primary-color: var(--cx-primary-fg-subtle);
|
|
7
|
-
--docsearch-subtle-color: var(--cx-border-subtle);
|
|
8
|
-
--docsearch-text-color: var(--cx-fg-main);
|
|
9
|
-
--docsearch-error-color: var(--cx-danger-fg-main);
|
|
10
|
-
--docsearch-success-color: var(--cx-success-fg-main);
|
|
11
|
-
--docsearch-secondary-text-color: var(--cx-fg-subtle);
|
|
12
|
-
--docsearch-background-color: var(--cx-bg-main);
|
|
13
|
-
--docsearch-icon-color: var(--cx-fg-subtle);
|
|
14
|
-
--docsearch-container-background: var(--cx-black-dim-main);
|
|
15
|
-
--docsearch-logo-color: var(--cx-primary);
|
|
16
|
-
--docsearch-muted-color: var(--cx-fg-subtle);
|
|
17
|
-
--docsearch-muted-color-darker: var(--cx-fg-slight);
|
|
18
|
-
|
|
19
|
-
/* Spacing & Layout */
|
|
20
|
-
--docsearch-spacing: var(--cx-space-medium);
|
|
21
|
-
--docsearch-border-radius: var(--cx-border-radius-medium);
|
|
22
|
-
--docsearch-icon-stroke-width: var(--cx-border-width-medium);
|
|
23
|
-
|
|
24
|
-
/* Highlights & Focus */
|
|
25
|
-
--docsearch-focus-color: var(--cx-primary);
|
|
26
|
-
--docsearch-highlight-color: var(--cx-primary);
|
|
27
|
-
|
|
28
|
-
/* Button */
|
|
29
|
-
--docsearch-search-button-background: var(--cx-bg-main);
|
|
30
|
-
--docsearch-search-button-text-color: var(--cx-fg-subtle);
|
|
31
|
-
|
|
32
|
-
/* Modal */
|
|
33
|
-
--docsearch-modal-width: 640px;
|
|
34
|
-
// --docsearch-modal-height: 600px;
|
|
35
|
-
// --docsearch-modal-variable-height: 60dvh;
|
|
36
|
-
--docsearch-modal-background: var(--cx-bg-even);
|
|
37
|
-
--docsearch-modal-shadow: var(--cx-box-shadow-large);
|
|
38
|
-
|
|
39
|
-
/* Searchbox */
|
|
40
|
-
// --docsearch-searchbox-height: 56px;
|
|
41
|
-
// --docsearch-searchbox-initial-height: 56px;
|
|
42
|
-
--docsearch-searchbox-background: var(--cx-bg-even);
|
|
43
|
-
--docsearch-searchbox-focus-background: var(--cx-bg-main);
|
|
44
|
-
// --docsearch-actions-width: 99px;
|
|
45
|
-
// --docsearch-actions-height: 44px;
|
|
46
|
-
|
|
47
|
-
/* Hit */
|
|
48
|
-
// --docsearch-hit-height: 56px;
|
|
49
|
-
--docsearch-hit-color: var(--cx-fg-main);
|
|
50
|
-
--docsearch-hit-highlight-color: var(--cx-bg-highlight);
|
|
51
|
-
--docsearch-hit-background: var(--cx-bg-main);
|
|
52
|
-
|
|
53
|
-
/* Key */
|
|
54
|
-
--docsearch-key-background: var(--cx-bg-main);
|
|
55
|
-
--docsearch-key-color: var(--cx-fg-subtle);
|
|
56
|
-
--docsearch-key-pressed-shadow: var(--cx-box-shadow-small);
|
|
57
|
-
|
|
58
|
-
/* Footer */
|
|
59
|
-
--docsearch-footer-height: 52px;
|
|
60
|
-
--docsearch-footer-background: var(--cx-bg-evident);
|
|
61
|
-
--docsearch-footer-shadow: var(--cx-box-shadow-small);
|
|
62
|
-
|
|
63
|
-
/* Dropdown Menu */
|
|
64
|
-
--docsearch-dropdown-menu-background: var(--docsearch-hit-background);
|
|
65
|
-
--docsearch-dropdown-menu-item-hover-background: var(--docsearch-modal-background);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.cxd-search {
|
|
69
|
-
position: relative;
|
|
70
|
-
|
|
71
|
-
@include media-breakpoint-up(large) {
|
|
72
|
-
position: absolute;
|
|
73
|
-
top: 20%;
|
|
74
|
-
right: 12rem;
|
|
75
|
-
width: 200px;
|
|
76
|
-
}
|
|
77
|
-
@include media-breakpoint-up(2xlarge) {
|
|
78
|
-
left: 50%;
|
|
79
|
-
margin-left: 16rem;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.DocSearch-Container {
|
|
84
|
-
position: fixed;
|
|
85
|
-
z-index: 2000; // Make sure to be over all components showcased in the documentation
|
|
86
|
-
cursor: auto; // Needed because of [role="button"] in Algolia search modal. Remove once https://github.com/algolia/docsearch/issues/1370 is tackled.
|
|
87
|
-
|
|
88
|
-
@include media-breakpoint-up(large) {
|
|
89
|
-
padding-top: 4rem;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.DocSearch-Button {
|
|
94
|
-
width: 100%;
|
|
95
|
-
height: 38px; // Match Chassis inputs
|
|
96
|
-
margin: 0;
|
|
97
|
-
border: var(--cx-border-width-medium) solid var(--cx-border-subtle);
|
|
98
|
-
@include border-radius(var(--cx-border-radius-medium));
|
|
99
|
-
|
|
100
|
-
.DocSearch-Search-Icon {
|
|
101
|
-
opacity: .65;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
&:active,
|
|
105
|
-
&:focus,
|
|
106
|
-
&:hover {
|
|
107
|
-
.DocSearch-Search-Icon {
|
|
108
|
-
opacity: 1;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
@include media-breakpoint-down(large) {
|
|
113
|
-
&,
|
|
114
|
-
&:hover,
|
|
115
|
-
&:focus {
|
|
116
|
-
background: transparent;
|
|
117
|
-
border: 0;
|
|
118
|
-
box-shadow: none;
|
|
119
|
-
}
|
|
120
|
-
&:focus {
|
|
121
|
-
box-shadow: var(--docsearch-searchbox-shadow);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.DocSearch-Button-Keys,
|
|
127
|
-
.DocSearch-Button-Placeholder {
|
|
128
|
-
@include media-breakpoint-down(large) {
|
|
129
|
-
display: none;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.DocSearch-Button-Keys {
|
|
134
|
-
min-width: 0;
|
|
135
|
-
padding: .125rem .5rem;
|
|
136
|
-
background: var(--cx-bg-evident);
|
|
137
|
-
@include border-radius(var(--cx-border-radius-small));
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.DocSearch-Button-Key {
|
|
141
|
-
top: 0;
|
|
142
|
-
width: auto;
|
|
143
|
-
padding: 0;
|
|
144
|
-
@include font-size(.875rem);
|
|
145
|
-
background: none;
|
|
146
|
-
border: 0;
|
|
147
|
-
box-shadow: none;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.DocSearch-Commands-Key {
|
|
151
|
-
width: 16px;
|
|
152
|
-
height: 16px;
|
|
153
|
-
padding: 0;
|
|
154
|
-
color: var(--cx-icon-subtle);
|
|
155
|
-
background: none;
|
|
156
|
-
box-shadow: none;
|
|
157
|
-
@include border-radius(var(--cx-border-radius-small));
|
|
158
|
-
.DocSearch-Escape-Key {
|
|
159
|
-
@include font-size(var(--cx-font-size-xsmall));
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.DocSearch-Action:hover,
|
|
164
|
-
.DocSearch-AskAi-Return:hover {
|
|
165
|
-
background: none;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.DocSearch-Hit {
|
|
169
|
-
padding-bottom: 0;
|
|
170
|
-
@include border-radius(0);
|
|
171
|
-
|
|
172
|
-
a {
|
|
173
|
-
@include border-radius(0);
|
|
174
|
-
border: solid var(--cx-border-subtle);
|
|
175
|
-
border-width: 0 var(--cx-border-width) var(--cx-border-width);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
&:first-child a {
|
|
179
|
-
@include border-top-radius(var(--cx-border-radius));
|
|
180
|
-
border-top-width: var(--cx-border-width);
|
|
181
|
-
}
|
|
182
|
-
&:last-child a {
|
|
183
|
-
@include border-bottom-radius(var(--cx-border-radius));
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.DocSearch-Hit-icon {
|
|
188
|
-
display: flex;
|
|
189
|
-
align-items: center;
|
|
190
|
-
margin-right: var(--cx-space-xsmall);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.DocSearch-Hit-content-wrapper {
|
|
194
|
-
gap: 0;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.DocSearch-Hit-action-button:focus,
|
|
198
|
-
.DocSearch-Hit-action-button:hover {
|
|
199
|
-
color: var(--cx-primary-fg-main);
|
|
200
|
-
background: none;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.DocSearch-Hit-action-button:focus path,
|
|
204
|
-
.DocSearch-Hit-action-button:hover path {
|
|
205
|
-
fill: none;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
// Fix --docsearch-logo-color that doesn't do anything
|
|
209
|
-
.DocSearch-Logo svg .cls-1,
|
|
210
|
-
.DocSearch-Logo svg .cls-2 {
|
|
211
|
-
fill: var(--docsearch-logo-color);
|
|
212
|
-
}
|
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
|
-
}
|
package/src/scss/_settings.scss
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
$prefix: cx- !default;
|
|
2
|
-
|
|
3
|
-
$color-mode-type: data !default; // `data` or `media-query`
|
|
4
|
-
|
|
5
|
-
$enable-accordion-sizes: true !default;
|
|
6
|
-
$enable-accordion-contexts: true !default;
|
|
7
|
-
$enable-button-pointers: true !default;
|
|
8
|
-
$enable-component-gradients: false !default;
|
|
9
|
-
$enable-component-shadows: false !default;
|
|
10
|
-
$enable-container-classes: true !default;
|
|
11
|
-
$enable-cssgrid: true !default;
|
|
12
|
-
$enable-dark-mode: true !default;
|
|
13
|
-
$enable-deprecation-messages: true !default;
|
|
14
|
-
$enable-elevation-shadows: true !default;
|
|
15
|
-
$enable-exclude-strokes: true !default;
|
|
16
|
-
$enable-grid-classes: true !default;
|
|
17
|
-
$enable-important-utilities: true !default;
|
|
18
|
-
$enable-negative-margins: true !default;
|
|
19
|
-
$enable-padding-box: true !default;
|
|
20
|
-
$enable-reduced-motion: true !default;
|
|
21
|
-
$enable-rfs: false !default;
|
|
22
|
-
$enable-rounded-borders: true !default;
|
|
23
|
-
$enable-smooth-scroll: true !default;
|
|
24
|
-
$enable-table-active-border: true !default;
|
|
25
|
-
$enable-table-border-radius: true !default;
|
|
26
|
-
$enable-table-font-tokens: true !default;
|
|
27
|
-
$enable-transitions: true !default;
|
|
28
|
-
$enable-validation-icons: true !default;
|
|
29
|
-
$enable-visited-links: false !default;
|
package/src/scss/_syntax.scss
DELETED
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
:root,
|
|
2
|
-
[data-cx-theme="light"] {
|
|
3
|
-
// GitHub Light Theme
|
|
4
|
-
--base00: #fff;
|
|
5
|
-
--base01: #f6f8fa;
|
|
6
|
-
--base02: #e1e4e8;
|
|
7
|
-
--base03: #6a737d; // Comments
|
|
8
|
-
--base04: #586069;
|
|
9
|
-
--base05: #24292e; // Default text
|
|
10
|
-
--base06: #24292e;
|
|
11
|
-
--base07: #22863a; // Tags/Classes
|
|
12
|
-
--base08: #d73a49; // Keywords/Important
|
|
13
|
-
--base09: #005cc5; // Numbers/Properties
|
|
14
|
-
--base0A: #005cc5; // Variables
|
|
15
|
-
--base0B: #6f42c1; // Functions
|
|
16
|
-
--base0C: #032f62; // Strings
|
|
17
|
-
--base0D: #6f42c1; // Attributes
|
|
18
|
-
--base0E: #d73a49; // Keywords
|
|
19
|
-
--base0F: #e36209; // References
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
@include color-mode(dark, true) {
|
|
23
|
-
// GitHub Dark Theme
|
|
24
|
-
--base00: #0d1117;
|
|
25
|
-
--base01: #161b22;
|
|
26
|
-
--base02: #21262d;
|
|
27
|
-
--base03: #8b949e; // Comments
|
|
28
|
-
--base04: #6e7681;
|
|
29
|
-
--base05: #c9d1d9; // Default text
|
|
30
|
-
--base06: #c9d1d9;
|
|
31
|
-
--base07: #7ee787; // Tags/Classes
|
|
32
|
-
--base08: #ff7b72; // Keywords/Important
|
|
33
|
-
--base09: #79c0ff; // Numbers/Properties
|
|
34
|
-
--base0A: #79c0ff; // Variables
|
|
35
|
-
--base0B: #d2a8ff; // Functions
|
|
36
|
-
--base0C: #a5d6ff; // Strings
|
|
37
|
-
--base0D: #d2a8ff; // Attributes
|
|
38
|
-
--base0E: #ff7b72; // Keywords
|
|
39
|
-
--base0F: #ffa657; // References
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// Shell prompts
|
|
43
|
-
.language-bash .line::before,
|
|
44
|
-
.language-sh .line::before {
|
|
45
|
-
display: inline-block;
|
|
46
|
-
color: var(--base03);
|
|
47
|
-
content: "$ ";
|
|
48
|
-
user-select: none;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.language-powershell .line::before {
|
|
52
|
-
display: inline-block;
|
|
53
|
-
color: var(--base0C);
|
|
54
|
-
content: "PM> ";
|
|
55
|
-
user-select: none;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// Token styles
|
|
59
|
-
.token {
|
|
60
|
-
&.comment,
|
|
61
|
-
&.prolog,
|
|
62
|
-
&.doctype,
|
|
63
|
-
&.cdata {
|
|
64
|
-
color: var(--base03);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
&.punctuation {
|
|
68
|
-
color: var(--base05);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&.property {
|
|
72
|
-
color: var(--base0A);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
&.tag {
|
|
76
|
-
color: var(--base08);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&.boolean,
|
|
80
|
-
&.number {
|
|
81
|
-
color: var(--base09);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
&.constant,
|
|
85
|
-
&.symbol,
|
|
86
|
-
&.deleted {
|
|
87
|
-
color: var(--base08);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
&.attr-name,
|
|
91
|
-
&.string,
|
|
92
|
-
&.char,
|
|
93
|
-
&.builtin,
|
|
94
|
-
&.inserted {
|
|
95
|
-
color: var(--base0C);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
&.operator,
|
|
99
|
-
&.entity,
|
|
100
|
-
&.url {
|
|
101
|
-
color: var(--base05);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
&.atrule,
|
|
105
|
-
&.attr-value,
|
|
106
|
-
&.keyword {
|
|
107
|
-
color: var(--base0E);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
&.function {
|
|
111
|
-
color: var(--base0B);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
&.selector,
|
|
115
|
-
&.class-name {
|
|
116
|
-
color: var(--base07);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
&.regex,
|
|
120
|
-
&.important {
|
|
121
|
-
color: var(--base0A);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
&.variable {
|
|
125
|
-
color: var(--base08);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
&.important,
|
|
129
|
-
&.bold {
|
|
130
|
-
font-weight: $font-weight-bold;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
&.italic {
|
|
134
|
-
font-style: italic;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
&.entity {
|
|
138
|
-
cursor: help;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.language-diff {
|
|
143
|
-
.token {
|
|
144
|
-
&.deleted {
|
|
145
|
-
color: $red-400;
|
|
146
|
-
background-color: transparent;
|
|
147
|
-
}
|
|
148
|
-
&.inserted {
|
|
149
|
-
color: $green-400;
|
|
150
|
-
background-color: transparent;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.language-bash,
|
|
156
|
-
.language-sh {
|
|
157
|
-
.token.comment {
|
|
158
|
-
color: var(--base03);
|
|
159
|
-
}
|
|
160
|
-
}
|
package/src/scss/_variables.scss
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
// Local docs variables
|
|
2
|
-
// $cxd-main: $primary-base-color;
|
|
3
|
-
// $cxd-subtle: lighten(saturate($cxd-main, 5%), 15%); // stylelint-disable-line function-disallowed-list
|
|
4
|
-
// $cxd-main-light: lighten(saturate($cxd-main, 5%), 45%); // stylelint-disable-line function-disallowed-list
|
|
5
|
-
// $cxd-accent: $secondary-base-color;
|
|
6
|
-
$cxd-main: var(--cx-primary-base-color);
|
|
7
|
-
$cxd-subtle: var(--cx-primary-bg-evident);
|
|
8
|
-
$cxd-main-light: var(--cx-primary-fg-main);
|
|
9
|
-
$cxd-accent: var(--cx-primary-base-color);
|
|
10
|
-
|
|
11
|
-
$cxd-gutter-x: 2rem;
|
|
12
|
-
$cxd-callout-variants: info, warning, danger, default !default;
|
|
13
|
-
|
|
14
|
-
:root,
|
|
15
|
-
[data-cx-theme="light"] {
|
|
16
|
-
--cxd-main: #{$cxd-main};
|
|
17
|
-
--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
|
-
--cxd-pink-rgb: #{to-rgb($pink-500)};
|
|
23
|
-
--cxd-teal-rgb: #{to-rgb($teal-500)};
|
|
24
|
-
--cxd-main-bg: var(--cxd-main);
|
|
25
|
-
--cxd-subtle-bg: var(--cxd-subtle);
|
|
26
|
-
--cxd-toc-color: var(--cxd-main);
|
|
27
|
-
--cxd-sidebar-link-bg: var(--cx-bg-highlight);
|
|
28
|
-
--cxd-callout-link: #{to-rgb($blue-600)};
|
|
29
|
-
--cxd-callout-code-color: #{$pink-600};
|
|
30
|
-
// --cxd-pre-bg: var(--cx-bg-even);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@if $enable-dark-mode {
|
|
34
|
-
@include color-mode(dark, true) {
|
|
35
|
-
color-scheme: dark;
|
|
36
|
-
--cxd-subtle: var(--cx-primary-60-rgb);
|
|
37
|
-
--cxd-subtle-bg: #{$cxd-subtle};
|
|
38
|
-
// --cxd-toc-color: var(--#{$prefix}fg-subtle);
|
|
39
|
-
--cxd-sidebar-link-bg: var(--cx-primary-40);
|
|
40
|
-
--cxd-callout-link: #{to-rgb($blue-300)};
|
|
41
|
-
--cxd-callout-code-color: #{$pink-300};
|
|
42
|
-
//--cxd-pre-bg: #{adjust-color($gray-900, $lightness: -2.5%)}; // stylelint-disable-line scss/at-function-named-arguments
|
|
43
|
-
--cxd-pre-bg: var(--cx-bg-evident);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// @import "../../../tokens/default.scss";
|
|
48
|
-
// h1:not(.cxd-example h1),
|
|
49
|
-
// h2:not(.cxd-example h2),
|
|
50
|
-
// h3:not(.cxd-example h3),
|
|
51
|
-
// h4:not(.cxd-example h4),
|
|
52
|
-
// h5:not(.cxd-example h5),
|
|
53
|
-
// h6:not(.cxd-example h6) {
|
|
54
|
-
// & ~ p,
|
|
55
|
-
// & ~ ol,
|
|
56
|
-
// & ~ ul {
|
|
57
|
-
// font-family: var(--cx-font-family-display) !important;
|
|
58
|
-
// }
|
|
59
|
-
// }
|
|
60
|
-
|
|
61
|
-
// .cxd-intro h1 {
|
|
62
|
-
// line-height: 1.25em;
|
|
63
|
-
// }
|
|
64
|
-
// .cxd-intro h1,
|
|
65
|
-
// .cxd-content > h1,
|
|
66
|
-
// .cxd-content > h2,
|
|
67
|
-
// .cxd-content > h3,
|
|
68
|
-
// .cxd-content > h4 {
|
|
69
|
-
// font-family: var(--cx-font-family-display) !important;
|
|
70
|
-
// font-weight: var(--cx-font-weight-display-strong) !important;
|
|
71
|
-
// }
|
|
72
|
-
//
|
|
73
|
-
// .cxd-playground textarea {
|
|
74
|
-
// font-family: var(--cx-font-family-code) !important;
|
|
75
|
-
// //font-size: var(--cx-font-small) !important;
|
|
76
|
-
// background-color: var(--cx-default-bg-even) !important;
|
|
77
|
-
// border-color: var(--cx-default-border-subtle);
|
|
78
|
-
// }
|