mirror of
https://github.com/material-components/material-web.git
synced 2026-01-09 07:21:09 +08:00
docs(menu): fix the popover demo and warning blockquote
PiperOrigin-RevId: 590796459
This commit is contained in:
parent
f92eb0efe0
commit
bad478dd91
@ -62,7 +62,7 @@ function blockquote($) {
|
||||
const $blockquote = $(blockquote);
|
||||
const $first = $blockquote.children().first();
|
||||
const text = $first.text().trim();
|
||||
const iconRegex = /^(tip|important|note):\s*/i;
|
||||
const iconRegex = /^(tip|important|note|warning):\s*/i;
|
||||
const match = text.match(iconRegex);
|
||||
const hasIcon = match;
|
||||
|
||||
@ -85,6 +85,10 @@ function blockquote($) {
|
||||
$blockquote.addClass('important');
|
||||
icon = 'priority_high';
|
||||
break;
|
||||
case 'warning':
|
||||
$blockquote.addClass('warning');
|
||||
icon = 'warning';
|
||||
break;
|
||||
case 'note':
|
||||
$blockquote.addClass('note');
|
||||
icon = 'bookmark';
|
||||
|
||||
@ -237,6 +237,15 @@ blockquote.important {
|
||||
}
|
||||
|
||||
blockquote.important,
|
||||
blockquote.important a {
|
||||
blockquote.important a {
|
||||
color: var(--md-sys-color-on-primary-container);
|
||||
}
|
||||
|
||||
blockquote.warning {
|
||||
background-color: var(--md-sys-color-error-container);
|
||||
}
|
||||
|
||||
blockquote.warning,
|
||||
blockquote.warning a {
|
||||
color: var(--md-sys-color-on-error-container);
|
||||
}
|
||||
|
||||
@ -243,7 +243,7 @@ to the bottom of the button with three items, Apple, Banana, and
|
||||
Cucumber."](images/menu/usage-popover.webp)
|
||||
|
||||
<!-- no-catalog-end -->
|
||||
<!-- catalog-include "figures/menu/usage-fixed.html" -->
|
||||
<!-- catalog-include "figures/menu/usage-popover.html" -->
|
||||
|
||||
```html
|
||||
<!-- Note the lack of position: relative parent. -->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user