Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ced0209

Browse files
authoredNov 23, 2024··
Split existing CSS styles into multiple scss partials (#3920)
1 parent c7f1160 commit ced0209

22 files changed

+1381
-1305
lines changed
 

‎lib/resources/docs.dart.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/resources/styles.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎web/sig.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22A0DF76266C40F6C6821F473937789F
1+
E8ACF6F50B82736C814C1F0BDE7849EE

‎web/styles/_base.scss

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
html,
6+
body {
7+
margin: 0;
8+
padding: 0;
9+
height: 100%;
10+
width: 100%;
11+
overflow: hidden;
12+
box-sizing: border-box;
13+
}
14+
15+
*, *:before, *:after {
16+
box-sizing: inherit;
17+
}
18+
19+
body {
20+
display: flex;
21+
flex-direction: column;
22+
-webkit-overflow-scrolling: touch;
23+
}
24+
25+
body {
26+
-webkit-text-size-adjust: 100%;
27+
overflow-x: hidden;
28+
font-family: Roboto, sans-serif;
29+
font-size: 16px;
30+
line-height: 1.42857143;
31+
color: var(--main-text-color);
32+
background-color: var(--main-bg-color);
33+
}
34+
35+
main {
36+
flex: 1;
37+
display: flex;
38+
flex-direction: row;
39+
min-height: 0;
40+
}

‎web/styles/_breadcrumbs.scss

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
.gt-separated {
6+
list-style: none;
7+
padding: 0;
8+
margin: 0;
9+
}
10+
11+
.gt-separated li {
12+
display: inline-block;
13+
}
14+
15+
.gt-separated li:before {
16+
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><path fill='%23DDDDDD' d='M6.7,4L5.7,4.9L8.8,8l-3.1,3.1L6.7,12l4-4L6.7,4z'/></svg>");
17+
background-position: center;
18+
content: "\00a0";
19+
margin: 0 6px 0 4px;
20+
padding: 0 3px 0 0;
21+
}
22+
23+
.gt-separated.dark li:before {
24+
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><path fill='%23727272' d='M6.7,4L5.7,4.9L8.8,8l-3.1,3.1L6.7,12l4-4L6.7,4z'/></svg>");
25+
}
26+
27+
.gt-separated li:first-child:before {
28+
background-image: none;
29+
content: "";
30+
margin: 0;
31+
padding: 0;
32+
}
33+
34+
.breadcrumbs {
35+
padding: 0;
36+
margin: 8px 0 8px 0;
37+
white-space: nowrap;
38+
line-height: 1;
39+
}
40+
41+
@media screen and (min-width: 840px) {
42+
nav ol.breadcrumbs {
43+
float: left;
44+
}
45+
}
46+
47+
@media screen and (max-width: 840px) {
48+
.breadcrumbs {
49+
margin: 0 0 24px 0;
50+
overflow-x: hidden;
51+
}
52+
}
53+
54+
.breadcrumbs .gt-separated .dark .hidden-xs li + li:before {
55+
color: var(--main-h-text);
56+
}
57+
58+
ol.breadcrumbs li a {
59+
color: var(--main-hyperlinks-color);
60+
}
61+
62+
.self-crumb {
63+
color: var(--main-h-text);
64+
}
65+
66+
.self-name {
67+
color: #555;
68+
display: none;
69+
}

‎web/styles/_code.scss

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
pre code {
6+
white-space: pre;
7+
word-wrap: initial;
8+
font-size: 100%
9+
}
10+
11+
pre {
12+
border: 1px solid #ddd;
13+
background-color: #eee;
14+
font-size: 14px;
15+
16+
@media(max-width: 840px) {
17+
margin: 16px 0;
18+
}
19+
}
20+
21+
code {
22+
font-family: 'Roboto Mono', Menlo, monospace;
23+
color: inherit;
24+
padding: 0.2em 0.4em;
25+
font-size: 85%;
26+
background-color: rgba(27, 31, 35, 0.05);
27+
border-radius: 3px;
28+
}
29+
30+
// Syntax highlighting, for highlightjs rendered code:
31+
32+
.hljs-string, .hljs-doctag {
33+
color: var(--main-string-color);
34+
}
35+
36+
.hljs-number, .hljs-literal, .hljs-variable, .hljs-template-variable, .hljs-tag .hljs-attr {
37+
color: var(--main-var-color);
38+
}
39+
40+
.hljs-comment, .hljs-quote {
41+
color: var(--main-comment-color);
42+
font-style: italic;
43+
}
44+
45+
.hljs-title, .hljs-section, .hljs-selector-id {
46+
color: var(--main-section-color);
47+
font-weight: bold;
48+
}
49+
50+
.hljs-tag, .hljs-name, .hljs-attribute {
51+
color: var(--main-tag-color);
52+
font-weight: normal;
53+
}
54+
55+
.hljs-keyword, .hljs-selector-tag, .hljs-subst {
56+
color: var(--main-keyword-color);
57+
font-weight: bold;
58+
}
59+
60+
.hljs {
61+
display: block;
62+
overflow-x: auto;
63+
padding: 0.5em;
64+
color: var(--main-text-color);
65+
background: var(--main-code-bg);
66+
}

‎web/styles/_content.scss

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
.main-content {
6+
flex: 1;
7+
order: 2;
8+
overflow-y: scroll;
9+
padding: 10px 20px 0 20px;
10+
}
11+
12+
a {
13+
text-decoration: none;
14+
}
15+
16+
section {
17+
/* Note that the generated HTML for pub packages may have `section` tags
18+
transformed into `div` tags. */
19+
margin-bottom: 36px;
20+
}
21+
22+
dl {
23+
margin: 0;
24+
}
25+
26+
header {
27+
background-color: var(--main-header-color);
28+
box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
29+
}
30+
31+
h1,
32+
h2,
33+
h3,
34+
h4,
35+
h5,
36+
h6 {
37+
font-family: Roboto, sans-serif;
38+
font-weight: 400;
39+
margin-top: 1.5em;
40+
color: var(--main-text-color);
41+
}
42+
43+
h1.title {
44+
overflow: hidden;
45+
text-overflow: ellipsis;
46+
}
47+
48+
h1 {
49+
font-size: 37px;
50+
margin-top: 0;
51+
margin-bottom: 0.67em;
52+
53+
@media(max-width: 840px) {
54+
font-size: 24px;
55+
}
56+
}
57+
58+
h2 {
59+
font-size: 28px;
60+
}
61+
62+
h5 {
63+
font-size: 16px;
64+
}
65+
66+
p {
67+
margin-bottom: 1em;
68+
margin-top: 0;
69+
}
70+
71+
a {
72+
color: var(--main-hyperlinks-color);
73+
}
74+
75+
a:hover {
76+
color: #13B9FD;
77+
}
78+
79+
.fixed {
80+
white-space: pre;
81+
}
82+
83+
header a,
84+
header p,
85+
header li {
86+
color: #0175C2;
87+
}
88+
89+
header a:hover {
90+
color: #0175C2;
91+
}
92+
93+
header h1 .kind {
94+
color: #555;
95+
}
96+
97+
header h1 {
98+
font-weight: 400;
99+
margin-bottom: 16px;
100+
}
101+
102+
dt {
103+
font-weight: normal;
104+
}
105+
106+
dd {
107+
color: var(--main-text-color);
108+
margin-bottom: 1em;
109+
margin-left: 0;
110+
}
111+
112+
dd.callable, dd.constant, dd.property {
113+
margin-bottom: 24px;
114+
}
115+
116+
dd p {
117+
overflow-x: hidden;
118+
text-overflow: ellipsis;
119+
margin-bottom: 0;
120+
}
121+
122+
table {
123+
margin-bottom: 1em;
124+
}
125+
126+
table,
127+
th,
128+
td {
129+
border: 1px solid lightgrey;
130+
border-collapse: collapse;
131+
}
132+
133+
th,
134+
td {
135+
padding: 8px;
136+
}

‎web/styles/_dartdoc.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
@forward "dartdoc/category";
6+
@forward "dartdoc/feature";
7+
@forward "dartdoc/members";
8+
@forward "dartdoc/misc";
9+
@forward "dartdoc/signature";

‎web/styles/_footer.scss

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
footer {
6+
flex: 0 0 16px;
7+
text-align: center;
8+
padding: 16px 20px;
9+
}
10+
11+
footer {
12+
color: #fff;
13+
background-color: var(--main-footer-background);
14+
width: 100%;
15+
}
16+
17+
footer p {
18+
margin: 0;
19+
}
20+
21+
footer .no-break {
22+
white-space: nowrap;
23+
}
24+
25+
footer .container {
26+
padding-left: 0;
27+
padding-right: 0;
28+
}
29+
30+
footer a, footer a:hover {
31+
color: #fff;
32+
}

‎web/styles/_gfm.scss

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
/* github alert styles */
6+
7+
.markdown-alert {
8+
margin-top: 1rem;
9+
margin-bottom: 1rem;
10+
padding: 1.25rem;
11+
}
12+
13+
.markdown-alert > :last-child {
14+
margin-bottom: 0;
15+
}
16+
17+
.markdown-alert-title {
18+
display: flex;
19+
align-items: center;
20+
gap: 0.4rem;
21+
margin-bottom: 0.5rem;
22+
23+
font-weight: bold;
24+
-webkit-font-smoothing: antialiased;
25+
}
26+
27+
.markdown-alert-title:before {
28+
font: 24px / 1 'Material Symbols Outlined';
29+
}
30+
31+
/* note, tip, important, warning, caution */
32+
33+
.markdown-alert.markdown-alert-note {
34+
background-color: var(--alert-info);
35+
}
36+
37+
.markdown-alert-note .markdown-alert-title:before {
38+
content: 'info';
39+
}
40+
41+
.markdown-alert.markdown-alert-tip {
42+
background-color: var(--alert-tip);
43+
}
44+
45+
.markdown-alert-tip .markdown-alert-title:before {
46+
content: 'lightbulb';
47+
}
48+
49+
.markdown-alert.markdown-alert-important {
50+
background-color: var(--alert-important);
51+
}
52+
53+
.markdown-alert-important .markdown-alert-title:before {
54+
content: 'feedback';
55+
}
56+
57+
.markdown-alert.markdown-alert-warning {
58+
background-color: var(--alert-warning);
59+
}
60+
61+
.markdown-alert-warning .markdown-alert-title:before {
62+
content: 'warning';
63+
}
64+
65+
.markdown-alert.markdown-alert-caution {
66+
background-color: var(--alert-error);
67+
}
68+
69+
.markdown-alert-caution .markdown-alert-title:before {
70+
content: 'report';
71+
}

‎web/styles/_header.scss

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
header {
6+
flex: 0 0 50px;
7+
display: flex;
8+
flex-direction: row;
9+
align-items: center;
10+
padding-left: 30px;
11+
padding-right: 30px;
12+
background-color: var(--main-header-color);
13+
}
14+
15+
header ol {
16+
list-style: none;
17+
margin: 0;
18+
padding: 0;
19+
}
20+
21+
header ol li {
22+
display: inline;
23+
}
24+
25+
header form {
26+
display: flex;
27+
flex: 1;
28+
justify-content: flex-end;
29+
}
30+
31+
header#header-search-sidebar {
32+
height: 50px;
33+
margin-bottom: 25px;
34+
}

‎web/styles/_navbar.scss

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
nav.navbar {
6+
background-color: inherit;
7+
min-height: 50px;
8+
border: 0;
9+
}
10+
11+
nav.navbar .row {
12+
padding-top: 8px;
13+
}
14+
15+
nav .container {
16+
white-space: nowrap;
17+
}
18+
19+
@media(max-width: 840px) {
20+
nav .container {
21+
width: 100%
22+
}
23+
}

‎web/styles/_print.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
@media print {
6+
.subnav, .sidebar {
7+
display: none;
8+
}
9+
10+
a[href]:after {
11+
content: "" !important;
12+
}
13+
}

‎web/styles/_search.scss

Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
.form-control {
6+
border-radius: 0;
7+
border: 0;
8+
}
9+
10+
@media screen and (max-width: 840px) {
11+
form.search {
12+
display: none;
13+
}
14+
}
15+
16+
.typeahead {
17+
width: 200px;
18+
padding: 2px 7px 1px 7px;
19+
line-height: 20px;
20+
outline: none;
21+
}
22+
23+
.tt-wrapper {
24+
position: relative;
25+
display: inline-block;
26+
}
27+
28+
.tt-input {
29+
position: relative;
30+
vertical-align: top;
31+
}
32+
33+
.navbar-right .tt-menu {
34+
right: 0;
35+
left: inherit !important;
36+
width: 540px;
37+
max-height: 280px;
38+
overflow-y: scroll;
39+
}
40+
41+
.navbar-right {
42+
padding-right: 60px;
43+
}
44+
45+
.tt-menu {
46+
position: absolute;
47+
top: 100%;
48+
left: 0;
49+
z-index: 100;
50+
font-size: 14px;
51+
margin: 0;
52+
background-color: var(--main-bg-color);
53+
border: 1px solid var(--main-header-color);
54+
box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
55+
}
56+
57+
58+
.typeahead {
59+
padding: 17px 17px 17px 50px;
60+
width: 422px;
61+
height: 20px;
62+
font-size: 13px;
63+
background-image: url("./search.svg");
64+
background-repeat: no-repeat;
65+
background-position: 4%;
66+
outline: 0;
67+
background-size: 20px;
68+
filter: var(--main-number-filter);
69+
}
70+
71+
.search-summary {
72+
margin-bottom: 10px;
73+
}
74+
75+
a.tt-container {
76+
font-size: 16px;
77+
color: var(--main-hyperlinks-color);
78+
}
79+
80+
.enter-search-message {
81+
position: sticky;
82+
top: 0;
83+
background-color: #AAA;
84+
padding: 0;
85+
font-size: 14px;
86+
margin: 0;
87+
clear: both;
88+
text-align: center;
89+
color: black;
90+
}
91+
92+
.tt-suggestion:hover {
93+
cursor: pointer;
94+
color: #fff;
95+
background-color: #0097cf;
96+
}
97+
98+
.tt-suggestion:hover .search-from-lib {
99+
color: #ddd;
100+
}
101+
102+
.tt-suggestion.tt-cursor {
103+
color: #fff;
104+
background-color: #0097cf;
105+
}
106+
107+
.tt-suggestion.tt-cursor .search-from-lib {
108+
color: #ddd;
109+
}
110+
111+
.tt-suggestion p {
112+
margin: 0;
113+
}
114+
115+
.tt-container {
116+
font-size: 14px;
117+
margin-bottom: 0;
118+
margin-top: 15px;
119+
}
120+
121+
.tt-container-text {
122+
color: var(--main-text-color);
123+
}
124+
125+
126+
/* Search results formatting for mini results below search bar. */
127+
128+
.tt-search-results .tt-container {
129+
margin-top: 5px;
130+
margin-bottom: 5px;
131+
}
132+
133+
/* Do not show the container as a section. */
134+
.tt-search-results .tt-container-text {
135+
display: none
136+
}
137+
138+
/* An inline style. */
139+
.tt-search-results .tt-suggestion {
140+
color: var(--main-text-color);
141+
margin-top: 5px;
142+
overflow: hidden;
143+
padding-left: 10px;
144+
padding-right: 10px;
145+
text-overflow: ellipsis;
146+
white-space: nowrap;
147+
}
148+
149+
.tt-search-results .tt-suggestion-title {
150+
font-size: 14px;
151+
padding-right: 5px;
152+
}
153+
154+
.tt-search-results .tt-suggestion-container {
155+
color: var(--main-keyword-color);
156+
font-size: 14px;
157+
font-style: italic;
158+
padding-right: 5px;
159+
}
160+
161+
.tt-search-results .one-line-description {
162+
color: var(--main-keyword-color);
163+
display: inline;
164+
margin-left: 0;
165+
}
166+
167+
168+
.tt-search-results .one-line-description::before {
169+
content: open-quote;
170+
}
171+
172+
.tt-search-results .one-line-description::after {
173+
content: close-quote;
174+
}
175+
176+
/* Search results formatting for `search.html`. */
177+
178+
/* A block style. */
179+
#dartdoc-main-content .tt-suggestion {
180+
color: var(--main-text-color);
181+
margin-top: 5px;
182+
margin-bottom: 10px;
183+
border-style: solid;
184+
border-color: lightgrey;
185+
border-width: 0.5px;
186+
}
187+
188+
#dartdoc-main-content .tt-suggestion-title {
189+
display: block;
190+
font-weight: 500;
191+
margin: 4px 10px 0;
192+
}
193+
194+
#dartdoc-main-content .one-line-description {
195+
display: block;
196+
margin: 2px 10px 3px;
197+
}
198+
199+
/* Do not show a result's container. */
200+
#dartdoc-main-content .tt-suggestion-container {
201+
display: none;
202+
}
203+
204+
@media screen and (max-width: 840px) {
205+
.typeahead {
206+
padding: 17px 17px 17px 33px;
207+
width: 240px;
208+
height: 17px;
209+
border: 1px solid #f5f5f5;
210+
background-position: 3%;
211+
margin: 10px 10px 10px 9px;
212+
}
213+
214+
header {
215+
padding-left: 0;
216+
}
217+
}
218+
219+
::placeholder {
220+
filter: brightness(0.85);
221+
}
222+
223+
.search-body {
224+
border: 1px solid #7f7f7f;
225+
max-width: 400px;
226+
box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.1);
227+
}

‎web/styles/_sidebar.scss

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
.sidebar ol {
6+
list-style: none;
7+
line-height: 22px;
8+
margin-top: 0;
9+
margin-bottom: 0;
10+
padding: 0 0 15px 0;
11+
}
12+
13+
.sidebar h5 a,
14+
.sidebar h5 a:hover {
15+
color: var(--main-sidebar-color);
16+
}
17+
18+
.sidebar h5,
19+
.sidebar ol li {
20+
text-overflow: ellipsis;
21+
overflow: hidden;
22+
padding: 3px 0 3px 3px;
23+
}
24+
25+
.sidebar h5 {
26+
color: var(--main-sidebar-color);
27+
font-size: 18px;
28+
margin: 0 0 22px 0;
29+
padding-top: 0;
30+
}
31+
32+
.sidebar ol li.section-title {
33+
font-size: 18px;
34+
font-weight: normal;
35+
text-transform: uppercase;
36+
padding-top: 25px;
37+
}
38+
39+
.sidebar ol li.section-subtitle a {
40+
color: inherit;
41+
}
42+
43+
.sidebar ol li.section-subtitle {
44+
font-weight: 400;
45+
text-transform: uppercase;
46+
}
47+
48+
.sidebar ol li.section-subitem {
49+
margin-left: 12px;
50+
}
51+
52+
.sidebar ol li:first-child {
53+
padding-top: 3px;
54+
margin-top: 0;
55+
}
56+
57+
button {
58+
padding: 0;
59+
}
60+
61+
#sidenav-left-toggle {
62+
display: none;
63+
vertical-align: text-bottom;
64+
padding: 0;
65+
color: var(--main-icon-color);
66+
user-select: none;
67+
cursor: pointer;
68+
}
69+
70+
#sidenav-left-toggle:hover {
71+
color: var(--main-hyperlinks-color);
72+
}
73+
74+
/* left-nav disappears, and can transition in from the left */
75+
@media screen and (max-width: 840px) {
76+
#sidenav-left-toggle {
77+
display: inline;
78+
width: 24px;
79+
height: 24px;
80+
border: none;
81+
margin-right: 24px;
82+
margin-left: 24px;
83+
font-size: 24px;
84+
}
85+
86+
#overlay-under-drawer.active {
87+
opacity: 0.4;
88+
height: 100%;
89+
z-index: 1999;
90+
position: fixed;
91+
top: 0;
92+
left: 0;
93+
right: 0;
94+
bottom: 0;
95+
background-color: black;
96+
display: block;
97+
}
98+
99+
.sidebar-offcanvas-left {
100+
left: -100%;
101+
position: fixed;
102+
transition: all .25s ease-out;
103+
z-index: 2000;
104+
top: 0;
105+
width: 280px; /* works all the way down to an iphone 4 */
106+
height: 90%;
107+
background-color: var(--main-bg-color);
108+
overflow-y: scroll; /* TODO: how to hide scroll bars? */
109+
padding: 10px;
110+
margin: 10px 10px;
111+
box-shadow: 5px 5px 5px 5px #444444;
112+
}
113+
114+
ol#sidebar-nav {
115+
font-size: 18px;
116+
white-space: pre-line;
117+
}
118+
119+
.sidebar-offcanvas-left.active {
120+
left: 0; /* this animates our drawer into the page */
121+
}
122+
123+
.self-name {
124+
display: inline-block;
125+
color: var(--main-hyperlinks-color);
126+
}
127+
}
128+
129+
.sidebar-offcanvas-left h5 {
130+
margin-bottom: 10px;
131+
}
132+
133+
.sidebar-offcanvas-left h5:last-of-type {
134+
border: 0;
135+
margin-bottom: 25px;
136+
}
137+
138+
/* the right nav disappears out of view when the window shrinks */
139+
@media screen and (max-width: 992px) {
140+
.sidebar-offcanvas-right {
141+
display: none;
142+
}
143+
}
144+
145+
#overlay-under-drawer {
146+
display: none;
147+
}
148+
149+
@media screen and (max-width: 320px) {
150+
#sidenav-left-toggle {
151+
margin-right: 10px;
152+
margin-left: 20px;
153+
}
154+
155+
.self-name {
156+
margin-right: 10px;
157+
}
158+
}
159+
160+
.sidebar-offcanvas-left {
161+
flex: 0 1 230px;
162+
order: 1;
163+
overflow-y: scroll;
164+
padding: 20px 0 15px 30px;
165+
margin: 5px 20px 0 0;
166+
}
167+
168+
.sidebar-offcanvas-right {
169+
flex: 0 1 12em;
170+
order: 3;
171+
overflow-y: scroll;
172+
padding: 20px 15px 15px 15px;
173+
margin-top: 5px;
174+
margin-right: 20px;
175+
}
176+
177+
::-webkit-scrollbar-button{ display: none; height: 13px; border-radius: 0; background-color: #AAA; }
178+
::-webkit-scrollbar-button:hover{ background-color: #AAA; }
179+
::-webkit-scrollbar-thumb{ background-color: var(--main-scrollbar-color); }
180+
::-webkit-scrollbar-thumb:hover{ background-color: var(--main-scrollbar-color); }
181+
::-webkit-scrollbar{ width: 4px; }
182+
183+
.main-content::-webkit-scrollbar{ width: 8px; }

‎web/styles/_theme.scss

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
.light-theme {
6+
/*background-color body, listdropdown*/
7+
--main-bg-color: #fff;
8+
/*header id-tittle*/
9+
--main-header-color: #eeeeee;
10+
/*package-name*/
11+
--main-sidebar-color: #727272;
12+
/*section-title and section subtitle, desc markdown(body, dd, h3), header a*/
13+
--main-text-color: #111111;
14+
/*typehead search-box*/
15+
--main-search-bar: #fff;
16+
/* scrollbar-thumb */
17+
--main-scrollbar-color: #CCC;
18+
/* footer */
19+
--main-footer-background: #111111;
20+
/*header text color*/
21+
--main-h-text: black;
22+
/* hyperlinks*/
23+
--main-hyperlinks-color: #0175C2;
24+
/*search background*/
25+
--main-search-background: transparent;
26+
27+
/*code snippets*/
28+
--main-code-bg: #f8f8f8;
29+
--main-keyword-color: #333;
30+
--main-tag-color: #000080;
31+
--main-section-color: #900;
32+
--main-comment-color: #998;
33+
--main-var-color: #008080;
34+
--main-string-color: #d14;
35+
36+
--main-number-filter: invert(0%);
37+
--main-icon-color: black;
38+
39+
/* alerts */
40+
--alert-info: #e7f8ff;
41+
--alert-tip: #ecfaf7;
42+
--alert-important: #e2dbff;
43+
--alert-warning: #fcf8e3;
44+
--alert-error: #fde9ee;
45+
}
46+
47+
.dark-theme {
48+
/*background-color body, listdropdown*/
49+
--main-bg-color: #10161E;
50+
/*header id-tittle*/
51+
--main-header-color: #1C2834;
52+
/*package-name*/
53+
--main-sidebar-color: #fff;
54+
/*section-title and section subtitle, desc markdown(body, dd, h3), header a*/
55+
--main-text-color: #fff;
56+
/*typehead search-box*/
57+
--main-search-bar: #454545;
58+
/* scrollbar-thumb */
59+
--main-scrollbar-color: #5f6368;
60+
/* footer */
61+
--main-footer-background: #27323a;
62+
/* hyperlinks*/
63+
--main-hyperlinks-color: #00D2FA;
64+
/*search background*/
65+
--main-search-background: black;
66+
67+
/*code snippets*/
68+
--main-code-bg: #10161E;
69+
--main-keyword-color: white;
70+
--main-tag-color: #00D2FA;
71+
--main-section-color: #FF2D64;
72+
--main-comment-color: #909CC3;
73+
--main-var-color: #55A09B;
74+
--main-string-color: #FF2D64;
75+
76+
--main-number-filter: invert(100%);
77+
--main-icon-color: white;
78+
79+
/* alerts */
80+
--alert-info: #043875;
81+
--alert-tip: #065517;
82+
--alert-important: #4a00b4;
83+
--alert-warning: #7b6909;
84+
--alert-error: #7a0c17;
85+
}
86+
87+
#theme {
88+
display: none;
89+
}
90+
91+
#theme-button {
92+
position: absolute;
93+
right: 30px;
94+
height: 24px;
95+
}
96+
97+
#theme-button .material-symbols-outlined {
98+
color: var(--main-icon-color);
99+
user-select: none;
100+
cursor: pointer;
101+
}
102+
103+
#theme-button .material-symbols-outlined:hover {
104+
color: var(--main-hyperlinks-color);
105+
}
106+
107+
li .material-symbols-outlined, dt .material-symbols-outlined {
108+
font-size: 1em;
109+
vertical-align: text-bottom;
110+
}
111+
112+
dt .material-symbols-outlined {
113+
text-indent: 0;
114+
}
115+
116+
.light-theme #light-theme-button {
117+
display: none;
118+
}
119+
120+
.dark-theme #dark-theme-button {
121+
display: none;
122+
}
123+
124+
/*
125+
Only show images that fit their theme using GitHub's syntax, see:
126+
https://github.blog/changelog/2021-11-24-specify-theme-context-for-images-in-markdown/
127+
*/
128+
.dark-theme img[src$="#gh-light-mode-only"] {
129+
display: none;
130+
}
131+
132+
.light-theme img[src$="#gh-dark-mode-only"] {
133+
display: none;
134+
}

‎web/styles/dartdoc/_category.scss

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
.category.linked {
6+
font-weight: bold;
7+
opacity: 1;
8+
}
9+
10+
/* Colors for category based on categoryOrder in dartdoc_options.config. */
11+
.category.cp-0 {
12+
background-color: #54b7c4
13+
}
14+
15+
.category.cp-1 {
16+
background-color: #54c47f
17+
}
18+
19+
.category.cp-2 {
20+
background-color: #c4c254
21+
}
22+
23+
.category.cp-3 {
24+
background-color: #c49f54
25+
}
26+
27+
.category.cp-4 {
28+
background-color: #c45465
29+
}
30+
31+
.category.cp-5 {
32+
background-color: #c454c4
33+
}
34+
35+
.category a {
36+
color: white;
37+
}
38+
39+
.category {
40+
padding: 2px 4px;
41+
font-size: 12px;
42+
border-radius: 4px;
43+
background-color: #999;
44+
text-transform: uppercase;
45+
color: white;
46+
opacity: .5;
47+
}
48+
49+
h1 .category {
50+
vertical-align: middle;
51+
}

‎web/styles/dartdoc/_feature.scss

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
/* The badge under a declaration for things like "const", "read-only", etc. and for the badges inline like sealed or interface */
6+
/* See https://github.com/dart-lang/dartdoc/blob/main/lib/src/model/feature.dart */
7+
.feature {
8+
display: inline-block;
9+
background: var(--main-bg-color);
10+
border: 1px solid var(--main-hyperlinks-color);
11+
border-radius: 20px;
12+
color: var(--main-hyperlinks-color);
13+
14+
font-size: 12px;
15+
padding: 1px 6px;
16+
margin: 0 8px 0 0;
17+
}
18+
19+
a.feature:hover {
20+
border-color: #13B9FD;
21+
}
22+
23+
h1 .feature {
24+
vertical-align: middle;
25+
margin: 0 -2px 0 0;
26+
}

‎web/styles/dartdoc/_members.scss

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
.markdown.desc {
6+
margin-bottom: 1em;
7+
max-width: 700px;
8+
}
9+
10+
.markdown h1 {
11+
font-size: 24px;
12+
margin-bottom: 8px;
13+
}
14+
15+
.markdown h2 {
16+
font-size: 20px;
17+
margin-top: 24px;
18+
margin-bottom: 8px;
19+
}
20+
21+
.markdown h3 {
22+
font-size: 18px;
23+
margin-bottom: 8px;
24+
color: var(--main-text-color);
25+
}
26+
27+
.markdown h4 {
28+
font-size: 16px;
29+
margin-bottom: 0;
30+
}
31+
32+
.markdown li p {
33+
margin: 0;
34+
}
35+
36+
/* Note that the generated HTML for pub packages may have `section` tags
37+
transformed into `div` tags, so we have two selectors here. */
38+
section#setter, div#setter {
39+
border-top: 1px solid #ddd;
40+
padding-top: 36px;
41+
}
42+
43+
li.inherited a {
44+
opacity: 0.65;
45+
font-style: italic;
46+
}
47+
48+
/* Enum values do not have their own pages; their full docs are presented on the
49+
* enum class's page. */
50+
dt.constant + dd p {
51+
margin-bottom: 1em;
52+
}
53+
54+
/* indents wrapped lines */
55+
/* Note that the generated HTML for pub packages may have `section` tags
56+
transformed into `div` tags, so we have two selectors here. */
57+
section.summary dt, div.summary dt {
58+
margin-left: 24px;
59+
text-indent: -24px;
60+
}
61+
62+
.dl-horizontal dd {
63+
margin-left: initial;
64+
}
65+
66+
dl.dl-horizontal dt {
67+
font-style: normal;
68+
text-align: left;
69+
color: #727272;
70+
margin-right: 20px;
71+
width: initial;
72+
}
73+
74+
dt .name {
75+
font-weight: 500;
76+
}
77+
78+
dl dt.callable .name {
79+
float: none;
80+
width: auto;
81+
}
82+
83+
/* Do not display "provided by X extension" text on extension pages. */
84+
.main-content.extension-page .from-extension {
85+
display: none;
86+
}
87+
88+
sup.muted {
89+
color: var(--main-sidebar-color);
90+
font-size: 0.6em;
91+
}
92+
93+
.from-extension > span {
94+
background-color: var(--alert-warning);
95+
font-style: italic;
96+
padding: 2px;
97+
}

‎web/styles/dartdoc/_misc.scss

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
.btn-group {
6+
position: relative;
7+
display: inline-flex;
8+
vertical-align: middle;
9+
}
10+
11+
.source-link {
12+
padding: 18px 4px;
13+
font-size: 18px;
14+
vertical-align: middle;
15+
}
16+
17+
@media (max-width: 840px) {
18+
.source-link {
19+
padding: 7px 2px;
20+
font-size: 10px;
21+
}
22+
}
23+
24+
#external-links {
25+
float: right;
26+
}
27+
28+
@media (max-width: 840px) {
29+
.hidden-xs {
30+
display: none !important;
31+
}
32+
}
33+
34+
@media (min-width: 841px) {
35+
.hidden-l {
36+
display: none !important;
37+
}
38+
}

‎web/styles/dartdoc/_signature.scss

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
.type-parameter {
6+
white-space: nowrap;
7+
}
8+
9+
.multi-line-signature .type-parameter .parameter {
10+
margin-left: 0;
11+
display: unset;
12+
}
13+
14+
.parameter-list {
15+
display: table-cell;
16+
margin-left: 10px;
17+
list-style-type: none;
18+
padding-inline-start: unset;
19+
}
20+
21+
.parameter-list.single-line {
22+
display: inline;
23+
margin-left: 0;
24+
}
25+
26+
.parameter-list.single-line > li {
27+
display: inline;
28+
}
29+
30+
.parameter-list.single-line > li > .parameter {
31+
display: inline;
32+
margin-left: 0;
33+
text-indent: 0;
34+
}
35+
36+
.signature {
37+
color: var(--main-text-color);
38+
}
39+
40+
.signature a {
41+
color: var(--main-hyperlinks-color);
42+
}
43+
44+
.deprecated {
45+
text-decoration: line-through;
46+
}
47+
48+
.multi-line-signature {
49+
font-size: 17px;
50+
color: #727272;
51+
}
52+
53+
.multi-line-signature .parameter {
54+
margin-left: 60px;
55+
display: block;
56+
text-indent: -36px;
57+
}
58+
59+
.annotation-list {
60+
list-style: none;
61+
padding: 0;
62+
display: inline;
63+
}
64+
65+
.comma-separated {
66+
list-style: none;
67+
padding: 0;
68+
display: inline;
69+
}
70+
71+
.comma-separated li {
72+
display: inline;
73+
}
74+
75+
.comma-separated li:after {
76+
content: ", ";
77+
}
78+
79+
.comma-separated li:last-child:after {
80+
content: "";
81+
}
82+
83+
.container > section:first-child {
84+
border: 0;
85+
}
86+
87+
.constructor-modifier {
88+
font-style: italic;
89+
}
90+
91+
/* Note that the generated HTML for pub packages may have `section` tags
92+
transformed into `div` tags, so we have two selectors here. */
93+
section.multi-line-signature div.parameters,
94+
div.multi-line-signature div.parameters {
95+
margin-left: 24px;
96+
}
97+
98+
#instance-methods dt.inherited .name,
99+
#instance-properties dt.inherited .name,
100+
#operators dt.inherited .name {
101+
font-weight: 400;
102+
font-style: italic;
103+
}
104+
105+
#instance-methods dt.inherited .signature,
106+
#instance-properties dt.inherited .signature,
107+
#operators dt.inherited .signature {
108+
font-weight: 400;
109+
}

‎web/styles/styles.scss

Lines changed: 20 additions & 1302 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.