-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy path_base.scss
103 lines (87 loc) · 2.28 KB
/
_base.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/** Base: General Styles */
@use './tokens.scss' as *;
@use './tokens-overrides' as *;
@use './mixins' as *;
:root {
--custom-selection-background-color: var(--strapi-primary-600);
}
::selection {
background-color: var(--custom-selection-background-color);
color: var(--custom-selection-color, var(--strapi-neutral-0));
}
main {
article:first-child:not(.col):not(.custom-doc-card),
article:first-child:not(.col) + nav {
--custom-main-px: var(--strapi-spacing-0);
--custom-main-width: 608px;
max-width: calc(var(--custom-main-width) + calc(var(--strapi-spacing-4) * 2));
padding-left: var(--custom-main-px) !important;
padding-right: var(--custom-main-px) !important;
margin-left: auto;
margin-right: auto;
}
}
/**
* Experimental: Different identity based on URL
* DOES NOT SEEM TO WORK ANYMORE, maybe data hydration is done too late?
*/
// html[class*="docs-doc-id-dev-docs"] {
// .navbar {
// background-color: var(--strapi-primary-100);
// }
// }
// html[class*="docs-doc-id-cloud"] {
// .navbar {
// background-color: var(--strapi-secondary-100);
// }
// .markdown {
// a {
// color: var(--strapi-secondary-600);
// }
// }
// .theme-doc-sidebar-item-link:has(.menu__link--active) {
// background-color: var(--strapi-secondary-100);
// }
// }
/** Responsive */
@include medium-up {
main {
article:first-child:not(.col),
article:first-child:not(.col) + nav {
--custom-main-px: var(--strapi-spacing-4);
}
}
}
/* Experimental: Another approach to style based on URL
* depends on folder-detector.js script
*/
// html[data-folder-source="cms"] {
// a {
// // color: var(--strapi-primary-600);
// }
// }
// html[data-folder-source="cloud"] {
// main a {
// color: var(--strapi-secondary-500) !important;
// }
// }
/** Dark mode */
@include dark {
body {
background-color: var(--strapi-primary-100);
}
html,
#__docusaurus,
.main-wrapper {
background-color: var(--strapi-primary-100);
}
:root[data-theme='dark'] {
--ifm-background-color: var(--strapi-primary-100);
}
.container img[width="16"] {
/* 'Temporary' fix while we figure a way to display white icons in dark mode 😅 */
background-color: white;
border-radius: 2px;
padding: 1px;
}
}