Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/dashboard/src/index.css
2498 views
1
/**
2
* Copyright (c) 2021 Gitpod GmbH. All rights reserved.
3
* Licensed under the GNU Affero General Public License (AGPL).
4
* See License.AGPL.txt in the project root for license information.
5
*/
6
7
@tailwind base;
8
@tailwind components;
9
@tailwind utilities;
10
11
@layer base {
12
/* Setup colors for different themes */
13
/* Using rgb color channels here to work well w/ tailwind classes */
14
/* https: //tailwindcss.com/docs/customizing-colors#using-css-variables */
15
:root {
16
/* Setup RGB color channel variables */
17
--black: 22 22 22; /* #161616 */
18
--white: 255 255 255; /* #FFFFFF */
19
/* TODO: determine if these are the reds we want - need to have correct contrast */
20
--red-600: 220 38 38;
21
--red-400: 248 68 68;
22
--gray-900: 18 16 12; /* #12100C */
23
--gray-850: 21 19 16; /* #151310 */
24
--gray-800: 35 33 30; /* #23211E */
25
--gray-750: 44 43 40; /* #2C2B28 */
26
--gray-700: 81 79 77; /* #514F4D */
27
--gray-600: 86 84 81; /* #565451 */
28
--gray-500: 102 101 100; /* #666564 */
29
--gray-450: 153 151 149; /* #999795 */
30
--gray-400: 116 115 114; /* #747372 */
31
--gray-300: 218 218 218; /* #DADADA */
32
--gray-200: 236 231 229; /* #ECE7E5 */
33
--gray-100: 245 244 244; /* #F5F4F4 */
34
--gray-50: 249 249 249; /* #F9F9F9 */
35
36
/* Content */
37
--content-primary: var(--gray-900);
38
--content-secondary: var(--gray-600);
39
--content-tertiary: var(--gray-400);
40
--content-disabled: var(--gray-450);
41
--content-invert-primary: var(--gray-200);
42
--content-invert-secondary: var(--gray-400);
43
--content-danger: var(--red-600);
44
45
/* Surfaces */
46
--surface-primary: var(--white);
47
--surface-secondary: var(--gray-50);
48
--surface-tertiary: var(--gray-100);
49
--surface-labels: var(--gray-200);
50
--surface-invert: var(--gray-850);
51
--surface-01: var(--dark-surface-01);
52
53
/* Borders */
54
--border-base: var(--gray-200);
55
--border-light: var(--gray-100);
56
--border-strong: var(--gray-500);
57
--border-invert: var(--gray-600);
58
}
59
60
/* Dark mode color adjustments */
61
:root[class~="dark"] {
62
/* Content */
63
--content-primary: var(--gray-200);
64
--content-secondary: var(--gray-450);
65
--content-tertiary: var(--gray-500);
66
--content-disabled: var(--gray-600);
67
--content-invert-primary: var(--gray-900);
68
--content-invert-secondary: var(--gray-450);
69
--content-danger: var(--red-400);
70
71
/* Surfaces */
72
--surface-primary: var(--gray-850);
73
--surface-secondary: var(--gray-800);
74
--surface-tertiary: var(--gray-750);
75
--surface-labels: var(--gray-700);
76
--surface-invert: var(--gray-50);
77
--surface-01: var(--gray-100);
78
79
/* Borders */
80
--border-base: var(--gray-700);
81
--border-light: var(--gray-800);
82
--border-strong: var(--gray-500);
83
--border-invert: var(--gray-400);
84
}
85
86
html,
87
body {
88
@apply h-full;
89
}
90
body {
91
@apply bg-white dark:bg-gitpod-black text-black dark:text-white;
92
}
93
body[style] {
94
/* https://github.com/gitpod-io/gitpod/pull/18979#discussion_r1380773740 */
95
margin: 0 auto !important;
96
}
97
p {
98
@apply text-sm text-pk-content-secondary;
99
}
100
101
.app-container {
102
@apply lg:px-28 px-4;
103
}
104
.dark .dark\:filter-invert {
105
@apply filter-invert;
106
}
107
.grayed {
108
filter: grayscale(100%);
109
}
110
.grayed:hover {
111
filter: none;
112
}
113
}
114
115
@layer components {
116
.gp-link {
117
@apply text-blue-500 hover:text-blue-600 dark:text-blue-400 dark:hover:text-blue-500 cursor-pointer;
118
}
119
120
code {
121
@apply bg-gray-100 dark:bg-gray-800 text-pk-content-primary px-1.5 py-0.5 rounded-md text-sm font-mono font-medium;
122
}
123
124
textarea,
125
input[type="text"],
126
input[type="tel"],
127
input[type="number"],
128
input[type="password"],
129
input[type="email"],
130
input[type="url"],
131
select {
132
@apply block w-56 text-gray-600 dark:text-gray-400 dark:bg-gray-800 bg-white rounded-lg border border-gray-300 dark:border-gray-500 focus:border-gray-400 dark:focus:border-gray-400 focus:ring-0;
133
}
134
textarea::placeholder,
135
input[type="text"]::placeholder,
136
input[type="tel"]::placeholder,
137
input[type="number"]::placeholder,
138
input[type="search"]::placeholder,
139
input[type="password"]::placeholder,
140
input[type="email"]::placeholder,
141
input[type="url"]::placeholder {
142
@apply text-gray-400 dark:text-gray-500;
143
}
144
input[type="text"].error,
145
input[type="tel"].error,
146
input[type="number"].error,
147
input[type="search"].error,
148
input[type="password"].error,
149
input[type="email"].error,
150
input[type="url"].error,
151
select.error {
152
@apply border-gitpod-red dark:border-gitpod-red focus:border-gitpod-red dark:focus:border-gitpod-red;
153
}
154
select[disabled],
155
textarea[disabled],
156
input[disabled] {
157
@apply bg-gray-100 dark:bg-gray-700 border border-gray-200 dark:border-gray-600 text-gray-400 dark:text-gray-500;
158
}
159
input[type="radio"] {
160
@apply border border-gray-300 focus:border-gray-400 focus:bg-white focus:ring-0;
161
}
162
163
/* Search */
164
input[type="search"] {
165
@apply border-0 dark:bg-gray-800 bg-gray-50 text-gray-600 dark:text-gray-400 rounded-lg focus:border-gray-400 dark:focus:border-gray-400 focus:outline-none focus:ring ring-0 focus:ring-blue-400 dark:focus:ring-blue-500 transition ease-in-out;
166
}
167
input[type="checkbox"] {
168
@apply disabled:opacity-50;
169
}
170
progress {
171
@apply h-2 rounded;
172
}
173
progress::-webkit-progress-bar {
174
@apply rounded-md bg-gray-200 dark:bg-gray-600;
175
}
176
progress::-webkit-progress-value {
177
@apply rounded-md bg-green-500;
178
}
179
progress::-moz-progress-bar {
180
@apply rounded-md bg-green-500;
181
}
182
}
183
184