|
1 | 1 | /* Overrides for dartdoc styles. */ |
2 | | -body { |
3 | | - font-size: 15px; |
4 | | - font-family: Roboto, sans-serif; |
5 | | - line-height: 1.5; |
6 | | - color: #111; |
7 | | - background-color: #fdfdfd; |
8 | | - -webkit-font-smoothing: auto; |
9 | | -} |
10 | 2 |
|
11 | | -header { |
12 | | - background-color: white; |
13 | | - color: #424242; |
14 | | -} |
15 | | - |
16 | | -nav.navbar { |
17 | | - min-height: 57px; |
18 | | - padding: 6px 0; |
| 3 | +/* Prefer Open Sans for paragraph and other text */ |
| 4 | +body { |
| 5 | + font-family: "Open Sans", "Roboto", sans-serif; |
19 | 6 | } |
20 | 7 |
|
21 | | -header.header-fixed nav.navbar-fixed-top { |
22 | | - box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.37); |
| 8 | +/* Prefer Google Sans for headers */ |
| 9 | +h1, h2, h3, h4, h5, h6 .h1, .h2, .h3, .h4, .h5, .h6 { |
| 10 | + font-family: "Google Sans", "Roboto", sans-serif; |
23 | 11 | } |
24 | 12 |
|
25 | | -h1 { |
26 | | - font-size: 42px !important; |
27 | | - letter-spacing: -1px; |
| 13 | +.section-title, .breadcrumbs { |
| 14 | + font-family: "Google Sans", "Roboto", sans-serif; |
28 | 15 | } |
29 | 16 |
|
| 17 | +/* Make all the h2 headings slightly bigger. */ |
30 | 18 | h2 { |
31 | | - color: #111; |
32 | | - font-size: 24px; |
33 | | -} |
34 | | - |
35 | | -.markdown h2 { |
36 | 19 | font-size: 24px; |
37 | 20 | } |
38 | 21 |
|
39 | 22 | section.summary h2 { |
40 | | - font-size: 24px; |
41 | 23 | color: inherit; |
42 | 24 | border-bottom: none; |
43 | 25 | } |
44 | 26 |
|
45 | | -.sidebar ol, |
46 | | -.sidebar ol li.section-title { |
47 | | - font-size: inherit; |
48 | | -} |
49 | | - |
50 | | -@media screen and (max-width: 768px) { |
51 | | - .sidebar-offcanvas-left.active { |
52 | | - padding: 10px; |
53 | | - } |
54 | | -} |
55 | | - |
56 | | -.sidebar-offcanvas-left ol { |
57 | | - padding: 0 16px 16px 0; |
58 | | -} |
59 | | - |
60 | | -.sidebar-offcanvas-left h5 { |
61 | | - display: none; |
62 | | -} |
63 | | - |
64 | | -pre, |
65 | | -pre.prettyprint, |
66 | | -pre > code { |
67 | | - font-size: 14px; |
68 | | -} |
69 | | - |
70 | | -pre, |
71 | | -pre.prettyprint { |
72 | | - background: #f5f2f0; |
| 27 | +pre { |
73 | 28 | margin: 0 0 15px 0; |
74 | 29 | padding: 8px 12px; |
75 | | - border: 1px solid #cccccc; |
76 | 30 | border-radius: 4px; |
77 | 31 | } |
78 | 32 |
|
79 | 33 | code { |
| 34 | + /* Inherit the background color, otherwise all inline code blocks have a |
| 35 | + different color from the rest of the paragraph */ |
80 | 36 | background-color: inherit; |
81 | 37 | font-size: 1em; /* browsers default to smaller font for code */ |
82 | 38 | padding-left: 0; /* otherwise we get ragged left margins */ |
83 | 39 | padding-right: 0; |
84 | 40 | } |
85 | 41 |
|
| 42 | +/* Otherwise the description text is limited to a particular size instead of |
| 43 | + filling up the center of the page. */ |
86 | 44 | .markdown.desc { |
87 | 45 | max-width: inherit; |
88 | 46 | } |
89 | 47 |
|
| 48 | +/* Make the search box bigger and easier to read */ |
90 | 49 | #search-box { |
91 | | - color: #555; |
92 | | - background-color: #fff; |
93 | | - background-image: none; |
94 | | - border: 1px solid #ccc; |
95 | | - border-radius: 2px; |
96 | | - padding: 4px 6px; |
| 50 | + height: 24px; |
97 | 51 | font-size: 15px; |
| 52 | + padding-left: 40px; |
98 | 53 | } |
99 | 54 |
|
| 55 | +/* Make the typeahead match the search box font size */ |
100 | 56 | input.form-control.typeahead { |
101 | | - padding: 4px 7px; |
102 | 57 | font-size: 15px; |
103 | 58 | } |
104 | 59 |
|
| 60 | +/* Make description list terms not be so dim. */ |
105 | 61 | dl.dl-horizontal dt { |
106 | 62 | color: inherit; |
107 | 63 | } |
108 | 64 |
|
109 | | -/* Line the material icons up with their labels */ |
| 65 | +/* Line the material icons up with their labels |
| 66 | + See https://api.flutter.dev/flutter/material/Icons-class.html |
| 67 | + for where this matters. |
| 68 | + */ |
110 | 69 | i.md-36 { |
111 | | - vertical-align: bottom; |
| 70 | + vertical-align: middle; |
112 | 71 | } |
113 | 72 |
|
114 | | -/* address a style issue with the background of code sections */ |
| 73 | +/* Address a style issue with the background of code sections. Without this, the |
| 74 | + code inside a code block has a different background from the rest of the box. */ |
115 | 75 | code.hljs { |
116 | 76 | background: inherit; |
117 | 77 | } |
118 | 78 |
|
| 79 | +/* Make the footer smaller and less prominent. */ |
119 | 80 | footer { |
120 | 81 | font-size: 13px; |
121 | | - padding: 12px 20px; |
| 82 | + padding: 8px; |
122 | 83 | } |
| 84 | + |
123 | 85 | /* Override the comment color for highlight.js to make it more |
124 | | - prominent/readable */ |
| 86 | + prominent. */ |
125 | 87 | .hljs-comment { |
126 | 88 | color: #128c00; |
127 | 89 | font-style: italic; |
128 | 90 | font-weight: bold; |
129 | 91 | } |
130 | 92 |
|
131 | | -/* Constrain image width to container */ |
| 93 | +/* Make the summary headers contrast a bit with text. */ |
| 94 | +.summary h2 { |
| 95 | + opacity: 0.8; |
| 96 | +} |
| 97 | + |
| 98 | +/* Constrain the image width to the container so that images resize instead of |
| 99 | + causing the page to scroll horizontally */ |
132 | 100 | img { |
133 | 101 | max-width: 100% |
134 | 102 | } |
| 103 | + |
| 104 | +/* Light/Dark Theme adjustments */ |
| 105 | + |
| 106 | +.light-theme { |
| 107 | + /* This is the same link color as the main Flutter site */ |
| 108 | + --main-hyperlinks-color: rgb(19, 137, 253); |
| 109 | + --main-footer-background: #eee; |
| 110 | +} |
| 111 | + |
| 112 | +.dark-theme { |
| 113 | + --main-hyperlinks-color: rgb(81, 167, 254); |
| 114 | +} |
| 115 | + |
| 116 | +.light-theme footer { |
| 117 | + color: rgb(74, 74, 74); |
| 118 | +} |
| 119 | + |
| 120 | +.dark-theme footer { |
| 121 | + color:rgb(220, 220, 220); |
| 122 | +} |
| 123 | + |
| 124 | +body.light-theme { |
| 125 | + color:rgb(74, 74, 74); |
| 126 | +} |
| 127 | + |
| 128 | +body.dark-theme { |
| 129 | + color:rgb(220, 220, 220); |
| 130 | +} |
| 131 | + |
| 132 | +.dark-theme .multi-line-signature .name { |
| 133 | + color: rgb(163, 163, 163); |
| 134 | +} |
| 135 | + |
| 136 | +.dark-theme .parameter-name { |
| 137 | + color: rgb(163, 163, 163); |
| 138 | +} |
| 139 | + |
| 140 | +.dark-theme .parameter { |
| 141 | + color: rgb(163, 163, 163); |
| 142 | +} |
| 143 | + |
| 144 | +.light-theme pre { |
| 145 | + border: 1px solid white; |
| 146 | + color: #222; |
| 147 | + background-color:#eee; |
| 148 | +} |
| 149 | + |
| 150 | +.dark-theme pre { |
| 151 | + border: 1px solid #444; |
| 152 | + color: white; |
| 153 | + background-color:rgb(23, 32, 43); |
| 154 | +} |
| 155 | + |
| 156 | +.dark-theme .hljs-string { |
| 157 | + color:rgb(255, 100, 100); |
| 158 | +} |
| 159 | + |
| 160 | +.dark-theme .hljs-title { |
| 161 | + color:rgb(192, 184, 255); |
| 162 | +} |
0 commit comments