Skip to content

Commit 80ef7a8

Browse files
authored
Adjust alert/aside design (#3634)
* Adjust alert aside design * Be specific with title alignment
1 parent d3d294a commit 80ef7a8

File tree

3 files changed

+40
-18
lines changed

3 files changed

+40
-18
lines changed

lib/resources/styles.css

Lines changed: 38 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434

3535
/* alerts */
3636
--alert-info: #e7f8ff;
37+
--alert-tip: #ecfaf7;
38+
--alert-important: #e2dbff;
3739
--alert-warning: #fcf8e3;
3840
--alert-error: #fde9ee;
3941
}
@@ -71,9 +73,11 @@
7173
--main-icon-color: white;
7274

7375
/* alerts */
74-
--alert-info: #1976d2;
75-
--alert-warning: #ffe57f;
76-
--alert-error: #cf6679;
76+
--alert-info: #043875;
77+
--alert-tip: #065517;
78+
--alert-important: #4a00b4;
79+
--alert-warning: #7b6909;
80+
--alert-error: #7a0c17;
7781
}
7882

7983
#theme {
@@ -1213,27 +1217,25 @@ li.inherited a {
12131217
.markdown-alert {
12141218
margin-top: 1rem;
12151219
margin-bottom: 1rem;
1216-
padding: 30px;
1217-
}
1218-
1219-
.markdown-alert p:nth-child(2) {
1220-
display: inline;
1220+
padding: 1.25rem;
12211221
}
12221222

12231223
.markdown-alert>:last-child {
12241224
margin-bottom: 0;
12251225
}
12261226

12271227
.markdown-alert-title {
1228-
font-weight: bold;
1229-
}
1228+
display: flex;
1229+
align-items: center;
1230+
gap: 0.4rem;
1231+
margin-bottom: 0.5rem;
12301232

1231-
.markdown-alert-title:after {
1232-
content: ':';
1233+
font-weight: bold;
1234+
-webkit-font-smoothing: antialiased;
12331235
}
12341236

1235-
p.markdown-alert-title {
1236-
display: inline;
1237+
.markdown-alert-title:before {
1238+
font: 24px / 1 'Material Symbols Outlined';
12371239
}
12381240

12391241
/* note, tip, important, warning, caution */
@@ -1242,18 +1244,38 @@ p.markdown-alert-title {
12421244
background-color: var(--alert-info);
12431245
}
12441246

1247+
.markdown-alert-note .markdown-alert-title:before {
1248+
content: 'info';
1249+
}
1250+
12451251
.markdown-alert.markdown-alert-tip {
1246-
background-color: var(--alert-info);
1252+
background-color: var(--alert-tip);
1253+
}
1254+
1255+
.markdown-alert-tip .markdown-alert-title:before {
1256+
content: 'lightbulb';
12471257
}
12481258

12491259
.markdown-alert.markdown-alert-important {
1250-
background-color: var(--alert-info);
1260+
background-color: var(--alert-important);
1261+
}
1262+
1263+
.markdown-alert-important .markdown-alert-title:before {
1264+
content: 'feedback';
12511265
}
12521266

12531267
.markdown-alert.markdown-alert-warning {
12541268
background-color: var(--alert-warning);
12551269
}
12561270

1271+
.markdown-alert-warning .markdown-alert-title:before {
1272+
content: 'warning';
1273+
}
1274+
12571275
.markdown-alert.markdown-alert-caution {
12581276
background-color: var(--alert-error);
12591277
}
1278+
1279+
.markdown-alert-caution .markdown-alert-title:before {
1280+
content: 'report';
1281+
}

lib/src/generator/templates.aot_renderers_for_html.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3531,7 +3531,7 @@ String _deduplicated_lib_templates_html__head_html(TemplateDataBase context0) {
35313531
buffer.write('''
35323532
<link rel="preconnect" href="https://fonts.gstatic.com">
35333533
<link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap" rel="stylesheet">
3534-
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0" rel="stylesheet">
3534+
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" rel="stylesheet">
35353535
''');
35363536
buffer.writeln();
35373537
buffer.write('''

lib/templates/html/_head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
{{! TODO(jdkoren): unwrap ^useBaseHref sections when the option is removed.}}
2121
<link rel="preconnect" href="https://fonts.gstatic.com">
2222
<link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap" rel="stylesheet">
23-
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0" rel="stylesheet">
23+
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" rel="stylesheet">
2424
{{! **Update versions for static assets when changed to force browsers to refresh them.** }}
2525
<link rel="stylesheet" href="{{^useBaseHref}}%%__HTMLBASE_dartdoc_internal__%%{{/useBaseHref}}static-assets/github.css?v1">
2626
<link rel="stylesheet" href="{{^useBaseHref}}%%__HTMLBASE_dartdoc_internal__%%{{/useBaseHref}}static-assets/styles.css?v1">

0 commit comments

Comments
 (0)