Skip to content

refactor($theme-default): use stylus instead of native css in style tag #1933

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/@vuepress/theme-default/components/Page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ export default {
</script>

<style lang="stylus">
@require '../styles/wrapper.styl';
@require '../styles/wrapper.styl'

.page
padding-bottom 2rem
display block

.page {
padding-bottom: 2rem;
display: block;
}
</style>
76 changes: 31 additions & 45 deletions packages/@vuepress/theme-default/components/PageEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,50 +95,36 @@ export default {
}
</script>
<style lang="stylus">
@require '../styles/wrapper.styl';
@require '../styles/wrapper.styl'

.page-edit
@extend $wrapper
padding-top 1rem
padding-bottom 1rem
overflow auto

.edit-link
display inline-block
a
color lighten($textColor, 25%)
margin-right 0.25rem
.last-updated
float right
font-size 0.9em
.prefix
font-weight 500
color lighten($textColor, 25%)
.time
font-weight 400
color #aaa

@media (max-width: $MQMobile)
.page-edit
.edit-link
margin-bottom 0.5rem
.last-updated
font-size 0.8em
float none
text-align left

.page-edit {
@extend $wrapper;
padding-top: 1rem;
padding-bottom: 1rem;
overflow: auto;

.edit-link {
display: inline-block;

a {
color: lighten($textColor, 25%);
margin-right: 0.25rem;
}
}

.last-updated {
float: right;
font-size: 0.9em;

.prefix {
font-weight: 500;
color: lighten($textColor, 25%);
}

.time {
font-weight: 400;
color: #aaa;
}
}
}

@media (max-width: $MQMobile) {
.page-edit {
.edit-link {
margin-bottom: 0.5rem;
}

.last-updated {
font-size: 0.8em;
float: none;
text-align: left;
}
}
}
</style>
32 changes: 14 additions & 18 deletions packages/@vuepress/theme-default/components/PageNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,23 +99,19 @@ function flatten (items, res) {
}
</script>
<style lang="stylus">
@require '../styles/wrapper.styl';
@require '../styles/wrapper.styl'

.page-nav
@extend $wrapper
padding-top 1rem
padding-bottom 0
.inner
min-height 2rem
margin-top 0
border-top 1px solid $borderColor
padding-top 1rem
overflow auto // clear float
.next
float right

.page-nav {
@extend $wrapper;
padding-top: 1rem;
padding-bottom: 0;

.inner {
min-height: 2rem;
margin-top: 0;
border-top: 1px solid $borderColor;
padding-top: 1rem;
overflow: auto; // clear float
}

.next {
float: right;
}
}
</style>