summaryrefslogtreecommitdiff
path: root/examples/docs/src/styles/index.css
diff options
context:
space:
mode:
authorGravatar Ben Holmes <hey@bholmes.dev> 2022-03-18 17:29:51 -0400
committerGravatar GitHub <noreply@github.com> 2022-03-18 17:29:51 -0400
commit0a3d3e51a66af80fa949ba0f5e2104439d2be634 (patch)
tree54004a7be40efc510fa320c5d575aac5154bfdb8 /examples/docs/src/styles/index.css
parent1cd7184ca6fa6e60a69918e461f42c055e8a795e (diff)
downloadastro-0a3d3e51a66af80fa949ba0f5e2104439d2be634.tar.gz
astro-0a3d3e51a66af80fa949ba0f5e2104439d2be634.tar.zst
astro-0a3d3e51a66af80fa949ba0f5e2104439d2be634.zip
Feat: change to shiki default md renderer (#2824)
* feat: change Shiki to default * refactor: update blog styles for shiki * feat: update examples/docs styles for Shiki * refactor: remove Prism-ish examples/docs styles * refactor: simplify rules with `all: unset` * refactor: remove Prism styles * refactor: examples/with-md remove Prism-specific line-highlight * chore: add changeset * chore: update changeset versions * refactor: update syntax highlight test for scoped styles * fix: apply scoped style class to pre and span lines * feat: test that scoped styles cascade to shiki code * refactor: pass scopedClassName explicitly
Diffstat (limited to 'examples/docs/src/styles/index.css')
-rw-r--r--examples/docs/src/styles/index.css28
1 files changed, 11 insertions, 17 deletions
diff --git a/examples/docs/src/styles/index.css b/examples/docs/src/styles/index.css
index ad0a5adf7..971ccf9e5 100644
--- a/examples/docs/src/styles/index.css
+++ b/examples/docs/src/styles/index.css
@@ -151,14 +151,14 @@ article > section iframe {
aspect-ratio: 16 / 9;
}
-a > code:not([class*='language']) {
+a > code {
position: relative;
color: var(--theme-text-accent);
background: transparent;
text-underline-offset: var(--padding-block);
}
-a > code:not([class*='language'])::before {
+a > code::before {
content: '';
position: absolute;
top: 0;
@@ -187,30 +187,24 @@ strong {
}
/* Supporting Content */
-code {
- font-family: var(--font-mono);
- font-size: 0.85em;
-}
-code:not([class*='language']) {
+code {
--border-radius: 3px;
--padding-block: 0.2rem;
- --padding-inline: 0.4rem;
- color: var(--theme-code-inline-text);
+ --padding-inline: 0.33rem;
+
+ font-family: var(--font-mono);
+ font-size: 0.85em;
+ color: inherit;
background-color: var(--theme-code-inline-bg);
padding: var(--padding-block) var(--padding-inline);
margin: calc(var(--padding-block) * -1) -0.125em;
border-radius: var(--border-radius);
- box-shadow: 0 2px 1px 0 rgba(0, 0, 0, 0.08);
word-break: break-word;
}
-pre > code:not([class*='language']) {
- background-color: transparent;
- padding: 0;
- margin: 0;
- border-radius: 0;
- color: inherit;
+pre.astro-code > code {
+ all: unset;
}
pre > code {
@@ -261,7 +255,7 @@ pre {
color: var(--theme-code-text);
}
-blockquote code:not([class*='language']) {
+blockquote code {
background-color: var(--theme-bg);
}