Skip to content

Commit d2488c3

Browse files
committed
Improved docs header and syntax highlight styles
1 parent 4e3bf3b commit d2488c3

File tree

1 file changed

+63
-5
lines changed
  • packages/lit-dev-content/site/css

1 file changed

+63
-5
lines changed

packages/lit-dev-content/site/css/docs.css

Lines changed: 63 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ article {
4040
* Body text
4141
* ------------------------------------ */
4242

43+
article {
44+
color: #3E3E3E;
45+
}
46+
4347
article p {
4448
margin-block-start: 1.5em;
4549
margin-block-end: 1.5em;
@@ -70,6 +74,7 @@ article code:not([class]) {
7074
.CodeMirror {
7175
padding: 0.5em 1em;
7276
--playground-code-background: #f5f5f5;
77+
color: #3c3c3c;
7378
}
7479

7580
/* Playground examples */
@@ -92,6 +97,30 @@ playground-ide {
9297
background: var(--playground-code-background);
9398
}
9499

100+
/* Color theme */
101+
html {
102+
--playground-code-background: #f0f0f0;
103+
--playground-code-keyword-color: #d73a49;
104+
--playground-code-atom-color: #005cc5;
105+
--playground-code-number-color: #005cc5;
106+
--playground-code-def-color: #6f42c1;
107+
--playground-code-variable-color: #6f42c1;
108+
--playground-code-property-color: #e36209;
109+
--playground-code-operator-color: #d73a49;
110+
--playground-code-variable-2-color: #000000;
111+
--playground-code-variable-3-color: #000000;
112+
--playground-code-type-color: #005cc5;
113+
--playground-code-comment-color: #6a737d;
114+
--playground-code-string-color: #032f62;
115+
--playground-code-string-2-color: #032f62;
116+
--playground-code-meta-color: #000000;
117+
--playground-code-qualifier-color: #6f42c1;
118+
--playground-code-builtin-color: #6f42c1;
119+
--playground-code-tag-color: #032f62;
120+
--playground-code-attribute-color: #6f42c1;
121+
--playground-code-callee-color: #005cc5;
122+
}
123+
95124
/* ------------------------------------
96125
* Headings
97126
* ------------------------------------ */
@@ -104,12 +133,27 @@ article h1 {
104133
}
105134

106135
article h2 {
107-
color: var(--color-blue);
108-
font-size: 1.36em;
136+
color: #3b4b64;
137+
font-size: 1.8em;
138+
font-weight: 600;
139+
position: relative;
140+
}
141+
142+
article h2:not(:first-of-type) {
143+
border-top: 1px solid #d1d1d1;
144+
padding: 1.5em 0 0.5em 0;
145+
margin-top: 1.5em;
109146
}
110147

111148
article h3 {
149+
color: #647086;
150+
font-size: 1.2em;
112151
font-weight: 600;
152+
position: relative;
153+
}
154+
155+
article h3 {
156+
margin-top: 2.2em;
113157
}
114158

115159
article h4 {
@@ -130,6 +174,14 @@ article > h1:first-of-type {
130174
margin-top: 0;
131175
}
132176

177+
/* ------------------------------------
178+
* Lists
179+
* ------------------------------------ */
180+
181+
article li {
182+
padding-inline: 1em 10%;
183+
}
184+
133185
/* ------------------------------------
134186
* Tables
135187
* ------------------------------------ */
@@ -294,6 +346,11 @@ td {
294346
display: none;
295347
}
296348

349+
#inlineToc h2 {
350+
font-size: 1.5em;
351+
color: black;
352+
}
353+
297354
#inlineToc ol {
298355
list-style: disc;
299356
}
@@ -343,7 +400,7 @@ td {
343400

344401
#rhsToc > div > ol > li:not(:first-of-type) {
345402
/* Space between top-level lists */
346-
margin-top: 1em;
403+
margin-top: 0.2em;
347404
}
348405

349406
/* Second level */
@@ -369,11 +426,12 @@ td {
369426
color: black;
370427
opacity: 0.5;
371428
font-size: 0.8em;
429+
position: relative;
372430
}
373431

374-
#rhsToc a.active {
432+
#rhsToc a.active,
433+
#rhsToc a:hover {
375434
opacity: 1;
376-
position: relative;
377435
}
378436

379437
/* Active section bullet */

0 commit comments

Comments
 (0)