overrides.css 3.31 KB
Newer Older
1 2
/* Overrides for dartdoc styles. */

3 4 5
/* Prefer Open Sans for paragraph and other text */
body {
  font-family: "Open Sans", "Roboto", sans-serif;
6 7
}

8 9 10
/* Prefer Google Sans for headers */
h1, h2, h3, h4, h5, h6 .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: "Google Sans", "Roboto", sans-serif;
11 12
}

13 14
.section-title, .breadcrumbs {
  font-family: "Google Sans", "Roboto", sans-serif;
15 16
}

17
/* Make all the h2 headings slightly bigger. */
18 19 20 21
h2 {
  font-size: 24px;
}

22 23 24 25 26 27
/* Specifically make all the Markdown h2 headings slightly
   bigger, so the Markdown CSS doesn't override it. */
.markdown h2 {
  font-size: 24px;
}

28 29 30 31 32
section.summary h2 {
  color: inherit;
  border-bottom: none;
}

33
pre {
34 35 36 37 38 39
  margin: 0 0 15px 0;
  padding: 8px 12px;
  border-radius: 4px;
}

code {
40 41
  /* Inherit the background color, otherwise all inline code blocks have a
     different color from the rest of the paragraph */
42 43 44 45 46 47
  background-color: inherit;
  font-size: 1em; /* browsers default to smaller font for code */
  padding-left: 0; /* otherwise we get ragged left margins */
  padding-right: 0;
}

48 49
/* Otherwise the description text is limited to a particular size instead of
   filling up the center of the page. */
50 51 52 53
.markdown.desc {
  max-width: inherit;
}

54
/* Make the search box bigger and easier to read */
55
#search-box {
56
  height: 24px;
57
  font-size: 15px;
58
  padding-left: 40px;
59 60
}

61
/* Make the typeahead match the search box font size */
62 63 64 65
input.form-control.typeahead {
  font-size: 15px;
}

66
/* Make description list terms not be so dim. */
67 68 69 70
dl.dl-horizontal dt {
  color: inherit;
}

71 72 73 74
/* Line the material icons up with their labels
   See https://api.flutter.dev/flutter/material/Icons-class.html
   for where this matters.
 */
75
i.md-36 {
76
  vertical-align: middle;
77 78
}

79 80
/* Address a style issue with the background of code sections. Without this, the
   code inside a code block has a different background from the rest of the box. */
81 82 83 84
code.hljs {
  background: inherit;
}

85
/* Make the footer smaller and less prominent. */
86 87
footer {
  font-size: 13px;
88
  padding: 8px;
89
}
90

91
/* Override the comment color for highlight.js to make it more
92
   prominent. */
93 94 95 96 97
.hljs-comment {
  color: #128c00;
  font-style: italic;
  font-weight: bold;
}
98

99 100 101 102 103 104 105
/* Make the summary headers contrast a bit with text. */
.summary h2 {
  opacity: 0.8;
}

/* Constrain the image width to the container so that images resize instead of
   causing the page to scroll horizontally */
106 107 108
img {
  max-width: 100%
}
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168

/* Light/Dark Theme adjustments */

.light-theme {
  /* This is the same link color as the main Flutter site */
  --main-hyperlinks-color: rgb(19, 137, 253);
  --main-footer-background: #eee;
}

.dark-theme {
  --main-hyperlinks-color: rgb(81, 167, 254);
}

.light-theme footer {
  color: rgb(74, 74, 74);
}

.dark-theme footer {
  color:rgb(220, 220, 220);
}

body.light-theme {
  color:rgb(74, 74, 74);
}

body.dark-theme {
  color:rgb(220, 220, 220);
}

.dark-theme .multi-line-signature .name {
  color: rgb(163, 163, 163);
}

.dark-theme .parameter-name {
  color: rgb(163, 163, 163);
}

.dark-theme .parameter {
  color: rgb(163, 163, 163);
}

.light-theme pre {
  border: 1px solid white;
  color: #222;
  background-color:#eee;
}

.dark-theme pre {
  border: 1px solid #444;
  color: white;
  background-color:rgb(23, 32, 43);
}

.dark-theme .hljs-string {
  color:rgb(255, 100, 100);
}

.dark-theme .hljs-title {
  color:rgb(192, 184, 255);
}