Debian Codegraph @

debian/rust-vendor/portable-atomic/src/rustdoc.css

raw
1 /*
2 * Adapted from https://github.com/TheBevyFlock/bevy_cli/blob/d3e79396595f675798af5be8be56efbfd2737ba0/bevy_lint/assets/rustdoc.css.
3 * Adjusted to work well with our GFM (GitHub Flavored Markdown) to CommonMark converter.
4 */
5
6 /*
7 * Extended theme configuration.
8 *
9 * These colors are based off Github's (blue for notes, green for tips, etc.), though the exact
10 * colors are taken from `rustdoc`'s themes.
11 */
12 :root[data-theme="light"] {
13 --rustdoc-alert-note: #2196f3;
14 --rustdoc-alert-tip: #068000;
15 --rustdoc-alert-important: #6e4fc9;
16 --rustdoc-alert-warning: #ff8e00;
17 --rustdoc-alert-caution: #be2525;
18 }
19 :root[data-theme="dark"] {
20 --rustdoc-alert-note: #008dfd;
21 --rustdoc-alert-tip: #2bab63;
22 --rustdoc-alert-important: #b78cf2;
23 --rustdoc-alert-warning: #ff8e00;
24 --rustdoc-alert-caution: #d93d3d;
25 }
26 :root[data-theme="ayu"] {
27 --rustdoc-alert-note: #39afd7;
28 --rustdoc-alert-tip: #b8cc52;
29 --rustdoc-alert-important: #a37acc;
30 --rustdoc-alert-warning: #ff8e00;
31 --rustdoc-alert-caution: #df3600;
32 }
33
34 /*
35 * Alerts are siblings to the `.warning` class, and as such use many of the same rules.
36 *
37 * The first `<p>` in a alert must be the title, as it will be colored and styled differently.
38 */
39 .rustdoc-alert {
40 border-left: 2px solid;
41 margin: 0 0 0.75em 0;
42 position: relative;
43 overflow-x: visible !important;
44 }
45
46 /* Remove the existing quote margin and setup some padding instead. */
47 .rustdoc-alert blockquote {
48 margin: 0;
49 padding: 14px;
50 }
51
52 /* Make the alert title the same sans-serif font and size as headings. */
53 .rustdoc-alert blockquote > p:first-child {
54 font-family: "Fira Sans", Arial, sans-serif;
55 font-size: 1.125rem;
56 }
57
58 /* Color styles for different kinds of alerts. */
59 .rustdoc-alert.rustdoc-alert-note {
60 border-left-color: var(--rustdoc-alert-note);
61 }
62 .rustdoc-alert.rustdoc-alert-note blockquote > p:first-child {
63 color: var(--rustdoc-alert-note);
64 }
65
66 .rustdoc-alert.rustdoc-alert-tip {
67 border-left-color: var(--rustdoc-alert-tip);
68 }
69 .rustdoc-alert.rustdoc-alert-tip blockquote > p:first-child {
70 color: var(--rustdoc-alert-tip);
71 }
72
73 .rustdoc-alert.rustdoc-alert-important {
74 border-left-color: var(--rustdoc-alert-important);
75 }
76 .rustdoc-alert.rustdoc-alert-important blockquote > p:first-child {
77 color: var(--rustdoc-alert-important);
78 }
79
80 .rustdoc-alert.rustdoc-alert-warning {
81 border-left-color: var(--rustdoc-alert-warning);
82 }
83 .rustdoc-alert.rustdoc-alert-warning blockquote > p:first-child {
84 color: var(--rustdoc-alert-warning);
85 }
86
87 .rustdoc-alert.rustdoc-alert-caution {
88 border-left-color: var(--rustdoc-alert-caution);
89 }
90 .rustdoc-alert.rustdoc-alert-caution blockquote > p:first-child {
91 color: var(--rustdoc-alert-caution);
92 }