chore: reset light dom styles in mdjs-preview (#1752)

* chore: prettier format portal styles

* chore: reset light dom styles in mdjs-preview
This commit is contained in:
Thijs Louisse 2022-08-11 11:28:44 +02:00 committed by GitHub
parent a616fd8dca
commit facc094193
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -95,24 +95,38 @@ rocket-navigation ul > li.active > ul > li.current > ul {
} }
/* only apply on components list (li > 6) */ /* only apply on components list (li > 6) */
rocket-navigation > ul > li:nth-last-child(n+6) > a, rocket-navigation > ul > li:nth-last-child(n + 6) > a,
rocket-navigation > ul > li:nth-child(n+6) > a { rocket-navigation > ul > li:nth-child(n + 6) > a {
font-size: 16px; font-size: 16px;
text-transform: none; text-transform: none;
color: var(--primary-text-color); color: var(--primary-text-color);
} }
rocket-navigation > ul > li:nth-last-child(n+6) > a:hover, rocket-navigation > ul > li:nth-last-child(n + 6) > a:hover,
rocket-navigation > ul > li:nth-child(n+6) > a:hover { rocket-navigation > ul > li:nth-child(n + 6) > a:hover {
color: var(--primary-color); color: var(--primary-color);
} }
rocket-navigation > ul > li:nth-last-child(n+6) > ul, rocket-navigation > ul > li:nth-last-child(n + 6) > ul,
rocket-navigation ul > li:nth-child(n+6) > ul { rocket-navigation ul > li:nth-child(n + 6) > ul {
display: none; display: none;
} }
rocket-navigation > ul > li:nth-last-child(n+6).active > ul, rocket-navigation > ul > li:nth-last-child(n + 6).active > ul,
rocket-navigation ul > li:nth-child(n+6).active > ul { rocket-navigation ul > li:nth-child(n + 6).active > ul {
display: block; display: block;
} }
.markdown-body mdjs-preview > [slot='story'],
.markdown-body mdjs-preview > [slot='story'] :where(img, button, p, h1, h2, h3, h4, h5, h6) {
all: initial;
}
.markdown-body mdjs-preview > [slot='story'] {
/** keep user-agent behaviors for browser elements */
display: revert;
/** relevant inherited props (like font styles) should be kept */
font-family: inherit;
font-size: inherit;
color: inherit;
}