Skip to content

Commit 36e64a5

Browse files
committed
Split existing CSS styles into multiple scss partials
1 parent 5168f81 commit 36e64a5

21 files changed

+1372
-1304
lines changed

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-
45250896CEC08BF6C3F52F3320C7E033
1+
93D2E15550DA5F72D39CB8BA3C6BDA81

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: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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+
17+
code {
18+
font-family: 'Roboto Mono', Menlo, monospace;
19+
color: inherit;
20+
padding: 0.2em 0.4em;
21+
font-size: 85%;
22+
background-color: rgba(27, 31, 35, 0.05);
23+
border-radius: 3px;
24+
}
25+
26+
// Syntax highlighting, for highlightjs rendered code:
27+
28+
.hljs-string, .hljs-doctag {
29+
color: var(--main-string-color);
30+
}
31+
32+
.hljs-number, .hljs-literal, .hljs-variable, .hljs-template-variable, .hljs-tag .hljs-attr {
33+
color: var(--main-var-color);
34+
}
35+
36+
.hljs-comment, .hljs-quote {
37+
color: var(--main-comment-color);
38+
font-style: italic;
39+
}
40+
41+
.hljs-title, .hljs-section, .hljs-selector-id {
42+
color: var(--main-section-color);
43+
font-weight: bold;
44+
}
45+
46+
.hljs-tag, .hljs-name, .hljs-attribute {
47+
color: var(--main-tag-color);
48+
font-weight: normal;
49+
}
50+
51+
.hljs-keyword, .hljs-selector-tag, .hljs-subst {
52+
color: var(--main-keyword-color);
53+
font-weight: bold;
54+
}
55+
56+
.hljs {
57+
display: block;
58+
overflow-x: auto;
59+
padding: 0.5em;
60+
color: var(--main-text-color);
61+
background: var(--main-code-bg);
62+
}

web/styles/_content.scss

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
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+
54+
h2 {
55+
font-size: 28px;
56+
}
57+
58+
h5 {
59+
font-size: 16px;
60+
}
61+
62+
p {
63+
margin-bottom: 1em;
64+
margin-top: 0;
65+
}
66+
67+
a {
68+
color: var(--main-hyperlinks-color);
69+
}
70+
71+
a:hover {
72+
color: #13B9FD;
73+
}
74+
75+
.fixed {
76+
white-space: pre;
77+
}
78+
79+
header a,
80+
header p,
81+
header li {
82+
color: #0175C2;
83+
}
84+
85+
header a:hover {
86+
color: #0175C2;
87+
}
88+
89+
header h1 .kind {
90+
color: #555;
91+
}
92+
93+
header h1 {
94+
font-weight: 400;
95+
margin-bottom: 16px;
96+
}
97+
98+
dt {
99+
font-weight: normal;
100+
}
101+
102+
dd {
103+
color: var(--main-text-color);
104+
margin-bottom: 1em;
105+
margin-left: 0;
106+
}
107+
108+
dd.callable, dd.constant, dd.property {
109+
margin-bottom: 24px;
110+
}
111+
112+
dd p {
113+
overflow-x: hidden;
114+
text-overflow: ellipsis;
115+
margin-bottom: 0;
116+
}
117+
118+
table {
119+
margin-bottom: 1em;
120+
}
121+
122+
table,
123+
th,
124+
td {
125+
border: 1px solid lightgrey;
126+
border-collapse: collapse;
127+
}
128+
129+
th,
130+
td {
131+
padding: 8px;
132+
}

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

0 commit comments

Comments
 (0)