@chassis-ui/docs 0.1.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 +98 -0
- package/index.ts +7 -0
- package/package.json +66 -0
- package/src/components/DocsSidebar.astro +89 -0
- package/src/components/NavDocsMenu.astro +26 -0
- package/src/components/NavLink.astro +24 -0
- package/src/components/ResponsiveImage.astro +31 -0
- package/src/components/TableOfContents.astro +31 -0
- package/src/components/ThemeToggler.astro +70 -0
- package/src/components/shortcodes/AddedIn.astro +13 -0
- package/src/components/shortcodes/Callout.astro +37 -0
- package/src/components/shortcodes/CxTable.astro +16 -0
- package/src/js/color-modes.js +82 -0
- package/src/js/icon-loader.js +220 -0
- package/src/js/search.js +58 -0
- package/src/js/sidebar.js +30 -0
- package/src/js/theme-color.js +126 -0
- package/src/layouts/BaseLayout.astro +94 -0
- package/src/layouts/DocsLayout.astro +147 -0
- package/src/layouts/IconsLayout.astro +19 -0
- package/src/layouts/RedirectLayout.astro +23 -0
- package/src/layouts/SingleLayout.astro +33 -0
- package/src/layouts/footer/Footer.astro +56 -0
- package/src/layouts/footer/Scripts.astro +22 -0
- package/src/layouts/head/Analytics.astro +22 -0
- package/src/layouts/head/Favicons.astro +11 -0
- package/src/layouts/head/Head.astro +54 -0
- package/src/layouts/head/Scss.astro +9 -0
- package/src/layouts/head/Social.astro +38 -0
- package/src/layouts/head/Stylesheet.astro +15 -0
- package/src/layouts/header/Header.astro +19 -0
- package/src/layouts/header/Navigation.astro +121 -0
- package/src/layouts/header/Skippy.astro +22 -0
- package/src/libs/image.ts +13 -0
- package/src/libs/layout.ts +7 -0
- package/src/libs/rehype.ts +38 -0
- package/src/libs/remark.ts +205 -0
- package/src/libs/toc.ts +44 -0
- package/src/libs/utils.ts +122 -0
- package/src/scss/_anchor.scss +21 -0
- package/src/scss/_brand.scss +59 -0
- package/src/scss/_buttons.scss +36 -0
- package/src/scss/_callouts.scss +40 -0
- package/src/scss/_clipboard-js.scss +63 -0
- package/src/scss/_code.scss +116 -0
- package/src/scss/_colors.scss +140 -0
- package/src/scss/_content.scss +141 -0
- package/src/scss/_docsearch.scss +174 -0
- package/src/scss/_footer.scss +29 -0
- package/src/scss/_layout.scss +72 -0
- package/src/scss/_masthead.scss +124 -0
- package/src/scss/_navbar.scss +138 -0
- package/src/scss/_placeholder-img.scss +15 -0
- package/src/scss/_scrolling.scss +16 -0
- package/src/scss/_settings.scss +37 -0
- package/src/scss/_sidebar.scss +161 -0
- package/src/scss/_skippy.scss +7 -0
- package/src/scss/_syntax.scss +158 -0
- package/src/scss/_toc.scss +117 -0
- package/src/scss/_variables.scss +78 -0
- package/src/scss/fonts.scss +1 -0
- package/src/scss/main.scss +90 -0
- package/src/scss/search.scss +26 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
.cxd-navbar {
|
|
2
|
+
// box-shadow: 0 .5rem 1rem rgba($black, .15), inset 0 -1px 0 rgba($white, .15);
|
|
3
|
+
padding: 0;
|
|
4
|
+
// padding: .75rem 0;
|
|
5
|
+
background-color: rgba(var(--cx-bg-main-rgb), var(--cx-opacity-dim-main));
|
|
6
|
+
backdrop-filter: blur(24px);
|
|
7
|
+
border-bottom: var(--cx-border-width-medium) solid var(--cx-border-subtle);
|
|
8
|
+
|
|
9
|
+
// @media (forced-colors) {
|
|
10
|
+
// background-color: Canvas;
|
|
11
|
+
// }
|
|
12
|
+
|
|
13
|
+
&::after {
|
|
14
|
+
position: absolute;
|
|
15
|
+
inset: 0;
|
|
16
|
+
z-index: -1;
|
|
17
|
+
display: block;
|
|
18
|
+
content: "";
|
|
19
|
+
// background-image: linear-gradient(rgba(var(--cxd-subtle-rgb), 1), rgba(var(--cxd-subtle-rgb), .95));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.cxd-navbar-toggle {
|
|
23
|
+
@include media-breakpoint-down(large) {
|
|
24
|
+
width: 4.25rem;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.navbar-toggler {
|
|
29
|
+
padding: 0;
|
|
30
|
+
margin-right: -.5rem;
|
|
31
|
+
border: 0;
|
|
32
|
+
|
|
33
|
+
&:first-child {
|
|
34
|
+
margin-left: -.5rem;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.bi {
|
|
38
|
+
width: 1.5rem;
|
|
39
|
+
height: 1.5rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&:focus {
|
|
43
|
+
box-shadow: none;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.navbar-brand {
|
|
48
|
+
color: $white;
|
|
49
|
+
@include transition(transform .2s ease-in-out);
|
|
50
|
+
|
|
51
|
+
// &:hover {
|
|
52
|
+
// transform: rotate(-5deg) scale(1.1);
|
|
53
|
+
// }
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.navbar-toggler,
|
|
57
|
+
.nav-link {
|
|
58
|
+
--cx-caret-color: var(--cx-fg-color);
|
|
59
|
+
@include font-size(var(--cx-font-size-small));
|
|
60
|
+
font-weight: var(--cx-font-weight-strong);
|
|
61
|
+
// line-height: 1.75em;
|
|
62
|
+
text-transform: uppercase;
|
|
63
|
+
.icon {
|
|
64
|
+
--cx-icon-color: var(--cx-fg-color);
|
|
65
|
+
height: 24px;
|
|
66
|
+
vertical-align: -.275em;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@include media-breakpoint-up(large) {
|
|
70
|
+
padding: var(--cx-space-large);
|
|
71
|
+
&.active {
|
|
72
|
+
padding-bottom: var(--cx-space-medium);
|
|
73
|
+
border-bottom: var(--cx-border-width-2xlarge) solid var(--cx-primary-cue-main);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.navbar-nav-svg {
|
|
80
|
+
display: inline-block;
|
|
81
|
+
vertical-align: -.125rem;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.offcanvas-large {
|
|
85
|
+
background-color: var(--cxd-subtle-bg);
|
|
86
|
+
border-left: 0;
|
|
87
|
+
|
|
88
|
+
@include media-breakpoint-down(large) {
|
|
89
|
+
height: 100vh;
|
|
90
|
+
box-shadow: var(--cx-box-shadow-large);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.dropdown-toggle {
|
|
95
|
+
&:focus:not(:focus-visible) {
|
|
96
|
+
outline: 0;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.dropdown-menu {
|
|
101
|
+
--cx-dropdown-min-width: 12rem;
|
|
102
|
+
--cx-dropdown-padding-x: .25rem;
|
|
103
|
+
--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
|
+
@include rfs(.875rem, --cx-dropdown-font-size);
|
|
107
|
+
@include font-size(.875rem);
|
|
108
|
+
@include border-radius(.5rem);
|
|
109
|
+
position: absolute;
|
|
110
|
+
box-shadow: $dropdown-box-shadow;
|
|
111
|
+
|
|
112
|
+
li + li {
|
|
113
|
+
margin-top: .125rem;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.dropdown-item {
|
|
117
|
+
@include border-radius(.25rem);
|
|
118
|
+
|
|
119
|
+
&:active {
|
|
120
|
+
.icon {
|
|
121
|
+
color: inherit !important; // stylelint-disable-line declaration-no-important
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.active {
|
|
127
|
+
font-weight: 600;
|
|
128
|
+
|
|
129
|
+
.icon {
|
|
130
|
+
display: block !important; // stylelint-disable-line declaration-no-important
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.dropdown-menu-end {
|
|
136
|
+
--cx-dropdown-min-width: 8rem;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Placeholder svg used in the docs.
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// Remember to update `site/_layouts/examples.html` too if this changes!
|
|
6
|
+
|
|
7
|
+
.cxd-placeholder-image {
|
|
8
|
+
@include font-size(1.125rem);
|
|
9
|
+
user-select: none;
|
|
10
|
+
text-anchor: middle;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.cxd-placeholder-image-large {
|
|
14
|
+
@include font-size(3.5rem);
|
|
15
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// When navigating with the keyboard, prevent focus from landing behind the sticky header
|
|
2
|
+
|
|
3
|
+
main {
|
|
4
|
+
a,
|
|
5
|
+
button,
|
|
6
|
+
input,
|
|
7
|
+
select,
|
|
8
|
+
textarea,
|
|
9
|
+
h2,
|
|
10
|
+
h3,
|
|
11
|
+
h4,
|
|
12
|
+
[tabindex="0"] {
|
|
13
|
+
scroll-margin-top: 80px;
|
|
14
|
+
scroll-margin-bottom: 100px;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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-grid-classes: true !default;
|
|
16
|
+
$enable-important-utilities: true !default;
|
|
17
|
+
$enable-negative-margins: true !default;
|
|
18
|
+
$enable-padding-box: true !default;
|
|
19
|
+
$enable-reduced-motion: true !default;
|
|
20
|
+
$enable-rfs: false !default;
|
|
21
|
+
$enable-rounded-borders: true !default;
|
|
22
|
+
$enable-smooth-scroll: true !default;
|
|
23
|
+
$enable-table-active-border: true !default;
|
|
24
|
+
$enable-table-border-radius: true !default;
|
|
25
|
+
$enable-table-font-tokens: true !default;
|
|
26
|
+
$enable-transitions: true !default;
|
|
27
|
+
$enable-validation-icons: true !default;
|
|
28
|
+
$enable-visited-links: false !default;
|
|
29
|
+
|
|
30
|
+
//
|
|
31
|
+
// Icons
|
|
32
|
+
//
|
|
33
|
+
$icon-url-prefix: "/icons/svgs/" !default;
|
|
34
|
+
$icon-url-suffix: ".svg" !default;
|
|
35
|
+
|
|
36
|
+
// Import tokens from the Chassis Tokens package
|
|
37
|
+
// @import "../node_modules/@chassis-ui/tokens/dist/tokens/web/chassis-docs/allTokens";
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
.cxd-sidebar {
|
|
2
|
+
--#{$prefix}cue-main: var(--cx-secondary-cue-main);
|
|
3
|
+
--#{$prefix}bg-active: var(--cx-secondary-bg-solid);
|
|
4
|
+
--#{$prefix}fg-active: var(--cx-secondary-fg-solid);
|
|
5
|
+
--#{$prefix}bg-highlight: var(--cx-default-bg-highlight);
|
|
6
|
+
--#{$prefix}fg-highlight: var(--cx-fg-main);
|
|
7
|
+
|
|
8
|
+
@include media-breakpoint-up(large) {
|
|
9
|
+
position: sticky;
|
|
10
|
+
top: 4rem;
|
|
11
|
+
// background-color: var(--cx-bg-main);
|
|
12
|
+
// Override collapse behaviors
|
|
13
|
+
// stylelint-disable-next-line declaration-no-important
|
|
14
|
+
display: block !important;
|
|
15
|
+
height: subtract(100vh, 3rem);
|
|
16
|
+
padding: 1.5rem 0;
|
|
17
|
+
padding-right: .5rem;
|
|
18
|
+
overflow-x: visible;
|
|
19
|
+
// Prevent focus styles to be cut off:
|
|
20
|
+
overflow-y: auto;
|
|
21
|
+
border-right: var(--cx-border-width) solid var(--cx-border-subtle);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@include media-breakpoint-down(large) {
|
|
25
|
+
.offcanvas-large {
|
|
26
|
+
border-right-color: var(--cx-border-color);
|
|
27
|
+
box-shadow: var(--cx-box-shadow-large);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.cxd-links {
|
|
33
|
+
position: relative;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.cxd-links-group {
|
|
37
|
+
// @include border-radius(var(--cx-border-radius));
|
|
38
|
+
padding: 0;
|
|
39
|
+
margin: 0;
|
|
40
|
+
margin-bottom: 1.5rem;
|
|
41
|
+
list-style: none;
|
|
42
|
+
|
|
43
|
+
&.active {
|
|
44
|
+
padding-right: .5rem;
|
|
45
|
+
margin-right: -.5rem;
|
|
46
|
+
// background-color: var(--cx-secondary-bg-main);
|
|
47
|
+
// border-right: var(--cx-indicator-size) var(--cx-border-style) var(--cx-cue-main);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
ul {
|
|
51
|
+
padding: 0;
|
|
52
|
+
margin: .25rem 0;
|
|
53
|
+
list-style: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@include media-breakpoint-up(large) {
|
|
57
|
+
li:has(.active) {
|
|
58
|
+
// --#{$prefix}cue-main: var(--cx-secondary-fg-main);
|
|
59
|
+
}
|
|
60
|
+
li::before {
|
|
61
|
+
position: absolute;
|
|
62
|
+
width: 1px;
|
|
63
|
+
height: 2em;
|
|
64
|
+
// margin-top: -.25rem;
|
|
65
|
+
margin-left: .4rem;
|
|
66
|
+
// content: "\F1AB";
|
|
67
|
+
font-family: var(--cx-font-family-icon);
|
|
68
|
+
content: " ";
|
|
69
|
+
background-color: var(--cx-cue-main);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
li:first-child::before {
|
|
73
|
+
height: 2em;
|
|
74
|
+
margin-top: .8em;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
li:last-child::before {
|
|
78
|
+
height: .8em;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
li:only-child::before {
|
|
82
|
+
height: .8em;
|
|
83
|
+
margin-top: .4em;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
li::after {
|
|
87
|
+
//border-left: 8px var(--cx-border-style) var(--cx-secondary-base-color);
|
|
88
|
+
position: absolute;
|
|
89
|
+
left: 0;
|
|
90
|
+
width: .5rem;
|
|
91
|
+
height: 1px;
|
|
92
|
+
margin-top: .8em;
|
|
93
|
+
content: " ";
|
|
94
|
+
background-color: var(--cx-cue-main);
|
|
95
|
+
@include border-radius(50%);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.cxd-links-heading {
|
|
101
|
+
--cx-icon-color: var(--cx-fg-main);
|
|
102
|
+
--cx-icon-size: var(--cx-icon-xsmall);
|
|
103
|
+
display: flex;
|
|
104
|
+
gap: var(--cx-space-xsmall);
|
|
105
|
+
align-items: center;
|
|
106
|
+
color: var(--cx-fg-main);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
.cxd-links-nav {
|
|
111
|
+
@include media-breakpoint-down(large) {
|
|
112
|
+
@include font-size(.875rem);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@include media-breakpoint-between(xsmall, large) {
|
|
116
|
+
column-count: 2;
|
|
117
|
+
column-gap: 1.5rem;
|
|
118
|
+
|
|
119
|
+
.cxd-links-group {
|
|
120
|
+
break-inside: avoid;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.cxd-links-span-all {
|
|
124
|
+
column-span: all;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.cxd-links-link {
|
|
130
|
+
display: inline-block;
|
|
131
|
+
width: 100%;
|
|
132
|
+
padding: .15rem .5rem;
|
|
133
|
+
padding-left: 1.5rem;
|
|
134
|
+
margin-left: 0;
|
|
135
|
+
//margin-left: 1.125rem;
|
|
136
|
+
color: var(--cx-fg-color);
|
|
137
|
+
text-decoration: if($link-decoration == none, null, none);
|
|
138
|
+
@include font-size(var(--cx-font-size-small));
|
|
139
|
+
@include border-radius(var(--cx-border-radius));
|
|
140
|
+
|
|
141
|
+
&:hover,
|
|
142
|
+
&:focus {
|
|
143
|
+
color: var(--cx-fg-highlight);
|
|
144
|
+
//text-decoration: if($link-hover-decoration == underline, none, null);
|
|
145
|
+
background-color: var(--cx-bg-highlight);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&.active {
|
|
149
|
+
font-weight: 600;
|
|
150
|
+
color: var(--cx-fg-active);
|
|
151
|
+
background-color: var(--cx-bg-active);
|
|
152
|
+
}
|
|
153
|
+
// .active &:not(.active):hover {
|
|
154
|
+
// color: var(--cx-fg-color);
|
|
155
|
+
// background-color: var(--cx-dim-slight);
|
|
156
|
+
// }
|
|
157
|
+
|
|
158
|
+
&:visited:not(.active):not(:hover):not(:focus) {
|
|
159
|
+
color: var(--cx-fg-color);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
:root,
|
|
2
|
+
[data-cx-theme="light"] {
|
|
3
|
+
// --base00: #fff;
|
|
4
|
+
// --base01: #f5f5f5;
|
|
5
|
+
--base02: #c8c8fa;
|
|
6
|
+
--base03: #565c64;
|
|
7
|
+
--base04: #666;
|
|
8
|
+
--base05: #333;
|
|
9
|
+
--base06: #fff;
|
|
10
|
+
--base07: #{$teal-700}; // #9a6700
|
|
11
|
+
--base08: #{mix($red-500, $red-600, 50%)}; // #bc4c00
|
|
12
|
+
--base09: #{$cyan-700}; // #087990
|
|
13
|
+
--base0A: #{$purple-500}; // #795da3
|
|
14
|
+
--base0B: #{$blue-700}; // #183691
|
|
15
|
+
--base0C: #{$blue-700}; // #183691
|
|
16
|
+
--base0D: #{$purple-500}; // #795da3
|
|
17
|
+
--base0E: #{$pink-600}; // #a71d5d
|
|
18
|
+
--base0F: #333;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@include color-mode(dark, true) {
|
|
22
|
+
// --base00: #282c34;
|
|
23
|
+
// --base01: #353b45;
|
|
24
|
+
--base02: #3e4451;
|
|
25
|
+
--base03: #868e96;
|
|
26
|
+
--base04: #868e96;
|
|
27
|
+
--base05: #abb2bf;
|
|
28
|
+
--base06: #b6bdca;
|
|
29
|
+
--base07: #{$orange-300}; // #d19a66
|
|
30
|
+
--base08: #{$cyan-300};
|
|
31
|
+
--base09: #{$orange-300}; // #d19a66
|
|
32
|
+
--base0A: #{$yellow-200}; // #e5c07b
|
|
33
|
+
--base0B: #{$teal-300}; // #98c379
|
|
34
|
+
--base0C: #{$teal-300}; // #56b6c2
|
|
35
|
+
--base0D: #{$blue-300}; // #61afef
|
|
36
|
+
--base0E: #{$indigo-200}; // #c678dd
|
|
37
|
+
--base0F: #{$red-300}; // #be5046
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Shell prompts
|
|
41
|
+
.language-bash .line::before,
|
|
42
|
+
.language-sh .line::before {
|
|
43
|
+
display: inline-block;
|
|
44
|
+
color: var(--base03);
|
|
45
|
+
content: "$ ";
|
|
46
|
+
user-select: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.language-powershell .line::before {
|
|
50
|
+
display: inline-block;
|
|
51
|
+
color: var(--base0C);
|
|
52
|
+
content: "PM> ";
|
|
53
|
+
user-select: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Token styles
|
|
57
|
+
.token {
|
|
58
|
+
&.comment,
|
|
59
|
+
&.prolog,
|
|
60
|
+
&.doctype,
|
|
61
|
+
&.cdata {
|
|
62
|
+
color: var(--base03);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&.punctuation {
|
|
66
|
+
color: var(--base05);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&.property {
|
|
70
|
+
color: var(--base0A);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&.tag {
|
|
74
|
+
color: var(--base08);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&.boolean,
|
|
78
|
+
&.number {
|
|
79
|
+
color: var(--base09);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&.constant,
|
|
83
|
+
&.symbol,
|
|
84
|
+
&.deleted {
|
|
85
|
+
color: var(--base08);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&.attr-name,
|
|
89
|
+
&.string,
|
|
90
|
+
&.char,
|
|
91
|
+
&.builtin,
|
|
92
|
+
&.inserted {
|
|
93
|
+
color: var(--base0C);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&.operator,
|
|
97
|
+
&.entity,
|
|
98
|
+
&.url {
|
|
99
|
+
color: var(--base05);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&.atrule,
|
|
103
|
+
&.attr-value,
|
|
104
|
+
&.keyword {
|
|
105
|
+
color: var(--base0E);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&.function {
|
|
109
|
+
color: var(--base0B);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&.selector,
|
|
113
|
+
&.class-name {
|
|
114
|
+
color: var(--base07);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&.regex,
|
|
118
|
+
&.important {
|
|
119
|
+
color: var(--base0A);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&.variable {
|
|
123
|
+
color: var(--base08);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&.important,
|
|
127
|
+
&.bold {
|
|
128
|
+
font-weight: $font-weight-bold;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&.italic {
|
|
132
|
+
font-style: italic;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&.entity {
|
|
136
|
+
cursor: help;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.language-diff {
|
|
141
|
+
.token {
|
|
142
|
+
&.deleted {
|
|
143
|
+
color: $red-400;
|
|
144
|
+
background-color: transparent;
|
|
145
|
+
}
|
|
146
|
+
&.inserted {
|
|
147
|
+
color: $green-400;
|
|
148
|
+
background-color: transparent;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.language-bash,
|
|
154
|
+
.language-sh {
|
|
155
|
+
.token.comment {
|
|
156
|
+
color: var(--base03);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// stylelint-disable selector-max-type, selector-no-qualifying-type
|
|
2
|
+
|
|
3
|
+
.cxd-toc {
|
|
4
|
+
@include media-breakpoint-up(large) {
|
|
5
|
+
position: sticky;
|
|
6
|
+
top: 4rem;
|
|
7
|
+
right: 0;
|
|
8
|
+
z-index: 2;
|
|
9
|
+
// height: subtract(100vh, 7rem);
|
|
10
|
+
height: 100vh;
|
|
11
|
+
padding: 1rem;
|
|
12
|
+
padding-right: 0;
|
|
13
|
+
overflow-y: auto;
|
|
14
|
+
color: var(--cx-fg-subtle);
|
|
15
|
+
// border-image: linear-gradient(var(--cx-border-subtle) 25%, var(--cx-transparent-color) 50%) 1;
|
|
16
|
+
// border-width: 0;
|
|
17
|
+
// border-style: solid;
|
|
18
|
+
border-left: var(--cx-border-width) var(--cx-border-style) var(--cx-border-subtle);
|
|
19
|
+
}
|
|
20
|
+
@include media-breakpoint-between(medium, large) {
|
|
21
|
+
padding: .5rem 1rem;
|
|
22
|
+
margin-bottom: 1rem;
|
|
23
|
+
background-color: var(--cx-bg-even);
|
|
24
|
+
border: var(--cx-border-width) var(--cx-border-style) var(--cx-border-subtle);
|
|
25
|
+
@include border-radius(var(--cx-border-radius));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
nav {
|
|
29
|
+
@include font-size(.875rem);
|
|
30
|
+
|
|
31
|
+
ul {
|
|
32
|
+
padding-left: 0;
|
|
33
|
+
margin-bottom: 0;
|
|
34
|
+
list-style: none;
|
|
35
|
+
|
|
36
|
+
ul {
|
|
37
|
+
padding-left: 2rem;
|
|
38
|
+
margin-left: -1rem;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
a {
|
|
43
|
+
display: block;
|
|
44
|
+
padding: .125rem 0 .125rem .5rem;
|
|
45
|
+
color: inherit;
|
|
46
|
+
text-decoration: none;
|
|
47
|
+
border-left: .125rem solid transparent;
|
|
48
|
+
|
|
49
|
+
@each $i in 1, 2, 3, 4, 5, 6 {
|
|
50
|
+
&.level-#{$i} {
|
|
51
|
+
padding-left: $i * 1rem;
|
|
52
|
+
margin-left: $i * -1rem;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:hover,
|
|
57
|
+
&.active {
|
|
58
|
+
color: var(--cxd-toc-color);
|
|
59
|
+
border-left-color: var(--cxd-toc-color);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&.active {
|
|
63
|
+
font-weight: 500;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
code {
|
|
67
|
+
font: inherit;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.cxd-toc-toggle {
|
|
74
|
+
box-sizing: border-box;
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
|
|
78
|
+
@include media-breakpoint-down(small) {
|
|
79
|
+
justify-content: space-between;
|
|
80
|
+
width: 100%;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@include media-breakpoint-down(medium) {
|
|
84
|
+
color: var(--cx-fg-color);
|
|
85
|
+
border: var(--cx-border-width) var(--cx-border-style) var(--cx-border-color);
|
|
86
|
+
@include border-radius(var(--cx-border-radius));
|
|
87
|
+
|
|
88
|
+
&:hover,
|
|
89
|
+
&:focus,
|
|
90
|
+
&:active,
|
|
91
|
+
&[aria-expanded="true"] {
|
|
92
|
+
color: var(--cxd-subtle);
|
|
93
|
+
background-color: var(--cx-bg-color);
|
|
94
|
+
// border-color: var(--cxd-subtle);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&:focus,
|
|
98
|
+
&[aria-expanded="true"] {
|
|
99
|
+
box-shadow: 0 0 0 3px rgba(var(--cxd-subtle-rgb), .25);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.cxd-toc-collapse {
|
|
105
|
+
@include media-breakpoint-down(medium) {
|
|
106
|
+
nav {
|
|
107
|
+
padding: 1.25rem 1.25rem 1.25rem 1rem;
|
|
108
|
+
background-color: var(--cx-bg-even);
|
|
109
|
+
border: var(--cx-border-width) solid var(--cx-border-subtle);
|
|
110
|
+
@include border-radius(var(--cx-border-radius));
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@include media-breakpoint-up(medium) {
|
|
115
|
+
display: block !important; // stylelint-disable-line declaration-no-important
|
|
116
|
+
}
|
|
117
|
+
}
|