Skip to content

Commit

Permalink
fix: keep svg viewbox and fix tutorial layout styles (#981)
Browse files Browse the repository at this point in the history
  • Loading branch information
charIeszhao authored Jan 22, 2025
1 parent bca1e0f commit a12128c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
10 changes: 9 additions & 1 deletion docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,15 @@ const config: Config = {
svgr: {
svgrConfig: {
svgoConfig: {
plugins: ['preset-default', 'prefixIds'],
plugins: [
{
name: 'preset-default',
params: {
overrides: { removeViewBox: false },
},
},
'prefixIds',
],
},
},
},
Expand Down
9 changes: 8 additions & 1 deletion src/theme/BlogLayout/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
display: flex;
flex-direction: column;
gap: 24px;
overflow: hidden;
margin-bottom: 50px;
}

Expand All @@ -24,6 +23,10 @@

&.hasToc {
max-width: 1200px;

.main {
max-width: min(900px, calc(100vw - 324px));
}
}
}

Expand All @@ -33,6 +36,10 @@

&.hasToc {
max-width: 100vw;

.main {
max-width: 100%;
}
}

.row .toc {
Expand Down

0 comments on commit a12128c

Please sign in to comment.