Skip to content

Commit bad478d

Browse files
Elliott Marquezcopybara-github
authored andcommitted
docs(menu): fix the popover demo and warning blockquote
PiperOrigin-RevId: 590796459
1 parent f92eb0e commit bad478d

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

catalog/eleventy-helpers/filters/md-markdown.cjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function blockquote($) {
6262
const $blockquote = $(blockquote);
6363
const $first = $blockquote.children().first();
6464
const text = $first.text().trim();
65-
const iconRegex = /^(tip|important|note):\s*/i;
65+
const iconRegex = /^(tip|important|note|warning):\s*/i;
6666
const match = text.match(iconRegex);
6767
const hasIcon = match;
6868

@@ -85,6 +85,10 @@ function blockquote($) {
8585
$blockquote.addClass('important');
8686
icon = 'priority_high';
8787
break;
88+
case 'warning':
89+
$blockquote.addClass('warning');
90+
icon = 'warning';
91+
break;
8892
case 'note':
8993
$blockquote.addClass('note');
9094
icon = 'bookmark';

catalog/site/css/md-layout.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,15 @@ blockquote.important {
237237
}
238238

239239
blockquote.important,
240-
blockquote.important a {
240+
blockquote.important a {
241241
color: var(--md-sys-color-on-primary-container);
242242
}
243+
244+
blockquote.warning {
245+
background-color: var(--md-sys-color-error-container);
246+
}
247+
248+
blockquote.warning,
249+
blockquote.warning a {
250+
color: var(--md-sys-color-on-error-container);
251+
}

docs/components/menu.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ to the bottom of the button with three items, Apple, Banana, and
243243
Cucumber."](images/menu/usage-popover.webp)
244244

245245
<!-- no-catalog-end -->
246-
<!-- catalog-include "figures/menu/usage-fixed.html" -->
246+
<!-- catalog-include "figures/menu/usage-popover.html" -->
247247

248248
```html
249249
<!-- Note the lack of position: relative parent. -->

0 commit comments

Comments
 (0)