Skip to content

Commit

Permalink
feat($core): safer class name of content outlet
Browse files Browse the repository at this point in the history
We shouldn't let the core render the `.content` class, so once we use custom layout in the default theme, the styles of default theme will pollute the styles of custom layout.
  • Loading branch information
ulivz committed Jun 2, 2019
1 parent 60da7d5 commit 7d0542e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ export default {
return h('div',
{
class: [
'content',
props.slotKey
`content__${props.slotKey}`
]
},
slots()[props.slotKey]
Expand Down
2 changes: 1 addition & 1 deletion packages/@vuepress/theme-default/components/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</div>
</div>

<Content class="custom"/>
<Content class="content custom"/>

<div
class="footer"
Expand Down
2 changes: 1 addition & 1 deletion packages/@vuepress/theme-default/components/Page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<main class="page">
<slot name="top"/>

<Content/>
<Content class="content"/>

<footer class="page-edit">
<div
Expand Down

0 comments on commit 7d0542e

Please sign in to comment.