Skip to content

Commit ced0209

Browse files
authored
Split existing CSS styles into multiple scss partials (#3920)
1 parent c7f1160 commit ced0209

22 files changed

+1381
-1305
lines changed

Diff for: lib/resources/docs.dart.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: lib/resources/styles.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: web/sig.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22A0DF76266C40F6C6821F473937789F
1+
E8ACF6F50B82736C814C1F0BDE7849EE

Diff for: web/styles/_base.scss

+40
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+
}

Diff for: web/styles/_breadcrumbs.scss

+69
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+
}

Diff for: web/styles/_code.scss

+66
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+
}

Diff for: web/styles/_content.scss

+136
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+
}

Diff for: web/styles/_dartdoc.scss

+9
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";

Diff for: web/styles/_footer.scss

+32
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+
}

0 commit comments

Comments
 (0)