Skip to content

Adjust alert/aside design #3634

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 38 additions & 16 deletions lib/resources/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@

/* alerts */
--alert-info: #e7f8ff;
--alert-tip: #ecfaf7;
--alert-important: #e2dbff;
--alert-warning: #fcf8e3;
--alert-error: #fde9ee;
}
Expand Down Expand Up @@ -71,9 +73,11 @@
--main-icon-color: white;

/* alerts */
--alert-info: #1976d2;
--alert-warning: #ffe57f;
--alert-error: #cf6679;
--alert-info: #043875;
--alert-tip: #065517;
--alert-important: #4a00b4;
--alert-warning: #7b6909;
--alert-error: #7a0c17;
}

#theme {
Expand Down Expand Up @@ -1213,27 +1217,25 @@ li.inherited a {
.markdown-alert {
margin-top: 1rem;
margin-bottom: 1rem;
padding: 30px;
}

.markdown-alert p:nth-child(2) {
display: inline;
padding: 1.25rem;
}

.markdown-alert>:last-child {
margin-bottom: 0;
}

.markdown-alert-title {
font-weight: bold;
}
display: flex;
align-items: center;
gap: 0.4rem;
margin-bottom: 0.5rem;

.markdown-alert-title:after {
content: ':';
font-weight: bold;
-webkit-font-smoothing: antialiased;
}

p.markdown-alert-title {
display: inline;
.markdown-alert-title:before {
font: 24px / 1 'Material Symbols Outlined';
}

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

.markdown-alert-note .markdown-alert-title:before {
content: 'info';
}

.markdown-alert.markdown-alert-tip {
background-color: var(--alert-info);
background-color: var(--alert-tip);
}

.markdown-alert-tip .markdown-alert-title:before {
content: 'lightbulb';
}

.markdown-alert.markdown-alert-important {
background-color: var(--alert-info);
background-color: var(--alert-important);
}

.markdown-alert-important .markdown-alert-title:before {
content: 'feedback';
}

.markdown-alert.markdown-alert-warning {
background-color: var(--alert-warning);
}

.markdown-alert-warning .markdown-alert-title:before {
content: 'warning';
}

.markdown-alert.markdown-alert-caution {
background-color: var(--alert-error);
}

.markdown-alert-caution .markdown-alert-title:before {
content: 'report';
}
2 changes: 1 addition & 1 deletion lib/src/generator/templates.aot_renderers_for_html.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3531,7 +3531,7 @@ String _deduplicated_lib_templates_html__head_html(TemplateDataBase context0) {
buffer.write('''
<link rel="preconnect" href="https://fonts.gstatic.com">
<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">
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" rel="stylesheet">
''');
buffer.writeln();
buffer.write('''
Expand Down
2 changes: 1 addition & 1 deletion lib/templates/html/_head.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{{! TODO(jdkoren): unwrap ^useBaseHref sections when the option is removed.}}
<link rel="preconnect" href="https://fonts.gstatic.com">
<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">
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" rel="stylesheet">
{{! **Update versions for static assets when changed to force browsers to refresh them.** }}
<link rel="stylesheet" href="{{^useBaseHref}}%%__HTMLBASE_dartdoc_internal__%%{{/useBaseHref}}static-assets/github.css?v1">
<link rel="stylesheet" href="{{^useBaseHref}}%%__HTMLBASE_dartdoc_internal__%%{{/useBaseHref}}static-assets/styles.css?v1">
Expand Down