Skip to content

Commit 7c973ab

Browse files
yoshinorinulivz
authored andcommitted
refactor($theme-default): use stylus instead of native css in style tag (#1933)
1 parent cdbfd75 commit 7c973ab

File tree

3 files changed

+50
-68
lines changed

3 files changed

+50
-68
lines changed

packages/@vuepress/theme-default/components/Page.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ export default {
2222
</script>
2323

2424
<style lang="stylus">
25-
@require '../styles/wrapper.styl';
25+
@require '../styles/wrapper.styl'
26+
27+
.page
28+
padding-bottom 2rem
29+
display block
2630
27-
.page {
28-
padding-bottom: 2rem;
29-
display: block;
30-
}
3131
</style>

packages/@vuepress/theme-default/components/PageEdit.vue

+31-45
Original file line numberDiff line numberDiff line change
@@ -95,50 +95,36 @@ export default {
9595
}
9696
</script>
9797
<style lang="stylus">
98-
@require '../styles/wrapper.styl';
98+
@require '../styles/wrapper.styl'
99+
100+
.page-edit
101+
@extend $wrapper
102+
padding-top 1rem
103+
padding-bottom 1rem
104+
overflow auto
105+
106+
.edit-link
107+
display inline-block
108+
a
109+
color lighten($textColor, 25%)
110+
margin-right 0.25rem
111+
.last-updated
112+
float right
113+
font-size 0.9em
114+
.prefix
115+
font-weight 500
116+
color lighten($textColor, 25%)
117+
.time
118+
font-weight 400
119+
color #aaa
120+
121+
@media (max-width: $MQMobile)
122+
.page-edit
123+
.edit-link
124+
margin-bottom 0.5rem
125+
.last-updated
126+
font-size 0.8em
127+
float none
128+
text-align left
99129
100-
.page-edit {
101-
@extend $wrapper;
102-
padding-top: 1rem;
103-
padding-bottom: 1rem;
104-
overflow: auto;
105-
106-
.edit-link {
107-
display: inline-block;
108-
109-
a {
110-
color: lighten($textColor, 25%);
111-
margin-right: 0.25rem;
112-
}
113-
}
114-
115-
.last-updated {
116-
float: right;
117-
font-size: 0.9em;
118-
119-
.prefix {
120-
font-weight: 500;
121-
color: lighten($textColor, 25%);
122-
}
123-
124-
.time {
125-
font-weight: 400;
126-
color: #aaa;
127-
}
128-
}
129-
}
130-
131-
@media (max-width: $MQMobile) {
132-
.page-edit {
133-
.edit-link {
134-
margin-bottom: 0.5rem;
135-
}
136-
137-
.last-updated {
138-
font-size: 0.8em;
139-
float: none;
140-
text-align: left;
141-
}
142-
}
143-
}
144130
</style>

packages/@vuepress/theme-default/components/PageNav.vue

+14-18
Original file line numberDiff line numberDiff line change
@@ -99,23 +99,19 @@ function flatten (items, res) {
9999
}
100100
</script>
101101
<style lang="stylus">
102-
@require '../styles/wrapper.styl';
102+
@require '../styles/wrapper.styl'
103+
104+
.page-nav
105+
@extend $wrapper
106+
padding-top 1rem
107+
padding-bottom 0
108+
.inner
109+
min-height 2rem
110+
margin-top 0
111+
border-top 1px solid $borderColor
112+
padding-top 1rem
113+
overflow auto // clear float
114+
.next
115+
float right
103116
104-
.page-nav {
105-
@extend $wrapper;
106-
padding-top: 1rem;
107-
padding-bottom: 0;
108-
109-
.inner {
110-
min-height: 2rem;
111-
margin-top: 0;
112-
border-top: 1px solid $borderColor;
113-
padding-top: 1rem;
114-
overflow: auto; // clear float
115-
}
116-
117-
.next {
118-
float: right;
119-
}
120-
}
121117
</style>

0 commit comments

Comments
 (0)