|
2 | 2 | // for details. All rights reserved. Use of this source code is governed by a |
3 | 3 | // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
|
5 | | -/* github alert styles */ |
6 | | - |
| 5 | +/// Alert/admonition styles used by GFM, but styled to match other Dart sites. |
7 | 6 | .markdown-alert { |
8 | 7 | margin-top: 1rem; |
9 | 8 | margin-bottom: 1rem; |
10 | | - padding: 1.25rem; |
11 | | -} |
| 9 | + padding: 0.75rem; |
12 | 10 |
|
13 | | -.markdown-alert > :last-child { |
14 | | - margin-bottom: 0; |
15 | | -} |
| 11 | + --alert-title-color: --main-inset-borderColor; |
16 | 12 |
|
17 | | -.markdown-alert-title { |
18 | | - display: flex; |
19 | | - align-items: center; |
20 | | - gap: 0.4rem; |
21 | | - margin-bottom: 0.5rem; |
| 13 | + background-color: var(--main-inset-bgColor); |
| 14 | + border-left: solid 0.25rem var(--alert-title-color); |
22 | 15 |
|
23 | | - font-weight: bold; |
24 | | - -webkit-font-smoothing: antialiased; |
25 | | -} |
| 16 | + > :last-child { |
| 17 | + margin-bottom: 0; |
| 18 | + } |
26 | 19 |
|
27 | | -.markdown-alert-title:before { |
28 | | - font: 24px / 1 'Material Symbols Outlined'; |
29 | | -} |
| 20 | + .markdown-alert-title { |
| 21 | + display: flex; |
| 22 | + align-items: center; |
| 23 | + gap: 0.5rem; |
| 24 | + margin-bottom: 0.5rem; |
30 | 25 |
|
31 | | -/* note, tip, important, warning, caution */ |
| 26 | + font-size: 1.125rem; |
| 27 | + font-weight: 500; |
| 28 | + -webkit-font-smoothing: antialiased; |
| 29 | + color: var(--alert-title-color, inherit); |
32 | 30 |
|
33 | | -.markdown-alert.markdown-alert-note { |
34 | | - background-color: var(--alert-info); |
35 | | -} |
| 31 | + &::before { |
| 32 | + font: 22px / 1 'Material Symbols Outlined'; |
| 33 | + user-select: none; |
| 34 | + } |
| 35 | + } |
36 | 36 |
|
37 | | -.markdown-alert-note .markdown-alert-title:before { |
38 | | - content: 'info'; |
39 | | -} |
| 37 | + &.markdown-alert-note { |
| 38 | + --alert-title-color: var(--alert-info-fgColor); |
40 | 39 |
|
41 | | -.markdown-alert.markdown-alert-tip { |
42 | | - background-color: var(--alert-tip); |
43 | | -} |
| 40 | + .markdown-alert-title::before { |
| 41 | + content: 'info'; |
| 42 | + } |
| 43 | + } |
44 | 44 |
|
45 | | -.markdown-alert-tip .markdown-alert-title:before { |
46 | | - content: 'lightbulb'; |
47 | | -} |
| 45 | + &.markdown-alert-tip { |
| 46 | + --alert-title-color: var(--alert-tip-fgColor); |
48 | 47 |
|
49 | | -.markdown-alert.markdown-alert-important { |
50 | | - background-color: var(--alert-important); |
51 | | -} |
| 48 | + .markdown-alert-title::before { |
| 49 | + content: 'lightbulb'; |
| 50 | + } |
| 51 | + } |
52 | 52 |
|
53 | | -.markdown-alert-important .markdown-alert-title:before { |
54 | | - content: 'feedback'; |
55 | | -} |
| 53 | + &.markdown-alert-important { |
| 54 | + --alert-title-color: var(--alert-important-fgColor); |
56 | 55 |
|
57 | | -.markdown-alert.markdown-alert-warning { |
58 | | - background-color: var(--alert-warning); |
59 | | -} |
| 56 | + .markdown-alert-title::before { |
| 57 | + content: 'feedback'; |
| 58 | + } |
| 59 | + } |
60 | 60 |
|
61 | | -.markdown-alert-warning .markdown-alert-title:before { |
62 | | - content: 'warning'; |
63 | | -} |
| 61 | + &.markdown-alert-warning { |
| 62 | + --alert-title-color: var(--alert-warning-fgColor); |
64 | 63 |
|
65 | | -.markdown-alert.markdown-alert-caution { |
66 | | - background-color: var(--alert-error); |
67 | | -} |
| 64 | + .markdown-alert-title::before { |
| 65 | + content: 'warning'; |
| 66 | + } |
| 67 | + } |
| 68 | + |
| 69 | + &.markdown-alert-caution { |
| 70 | + --alert-title-color: var(--alert-error-fgColor); |
68 | 71 |
|
69 | | -.markdown-alert-caution .markdown-alert-title:before { |
70 | | - content: 'report'; |
| 72 | + .markdown-alert-title::before { |
| 73 | + content: 'report'; |
| 74 | + } |
| 75 | + } |
71 | 76 | } |
0 commit comments