Skip to content

Commit 30d46ff

Browse files
visualfanatichaoqunjiang
authored andcommitted
refactor: automatically inject @/style/imports using import option provided by stylus loader (vuejs#2515)
1 parent 9357a60 commit 30d46ff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+10
-115
lines changed

packages/@vue/cli-ui/src/App.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ export default {
3434
</style>
3535

3636
<style lang="stylus" scoped>
37-
@import "~@/style/imports"
38-
3937
.app
4038
display flex
4139
flex-direction column

packages/@vue/cli-ui/src/components/ClientAddonComponent.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ export default {
3939
</script>
4040

4141
<style lang="stylus" scoped>
42-
@import "~@/style/imports"
43-
4442
.loading
4543
v-box()
4644
box-center()

packages/@vue/cli-ui/src/components/ConfigurationItem.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ export default {
3838
</script>
3939

4040
<style lang="stylus" scoped>
41-
@import "~@/style/imports"
42-
4341
.configuration-item
4442
padding $padding-item
4543

packages/@vue/cli-ui/src/components/ConnectionStatus.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ export default {
3131
</script>
3232

3333
<style lang="stylus" scoped>
34-
@import "~@/style/imports"
35-
3634
.content
3735
display flex
3836
align-items center

packages/@vue/cli-ui/src/components/ContentView.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ export default {
2525
</script>
2626

2727
<style lang="stylus" scoped>
28-
@import "~@/style/imports"
29-
3028
.content-view
3129
height 100%
3230

packages/@vue/cli-ui/src/components/FileDiff.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,6 @@ export default {
103103
</script>
104104

105105
<style lang="stylus" scoped>
106-
@import "~@/style/imports"
107-
108106
status-color($color)
109107
.name
110108
color $color

packages/@vue/cli-ui/src/components/FileDiffChange.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ export default {
7676
</script>
7777

7878
<style lang="stylus" scoped>
79-
@import "~@/style/imports"
80-
8179
.file-diff-change
8280
font-family $font-mono
8381
font-size 12px

packages/@vue/cli-ui/src/components/FileDiffChunk.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ export default {
2222
</script>
2323

2424
<style lang="stylus" scoped>
25-
@import "~@/style/imports"
26-
2725
.file-diff-chunk
2826
.changes
2927
overflow-x auto

packages/@vue/cli-ui/src/components/FileDiffView.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,6 @@ export default {
247247
</script>
248248

249249
<style lang="stylus" scoped>
250-
@import "~@/style/imports"
251-
252250
.file-diff-view
253251
v-box()
254252
height 100%

packages/@vue/cli-ui/src/components/FolderExplorer.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,6 @@ export default {
399399
</script>
400400

401401
<style lang="stylus" scoped>
402-
@import "~@/style/imports"
403-
404402
.toolbar
405403
padding $padding-item 0
406404
h-box()

packages/@vue/cli-ui/src/components/FolderExplorerItem.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ export default {
3838
</script>
3939

4040
<style lang="stylus" scoped>
41-
@import "~@/style/imports"
42-
4341
.folder-explorer-item
4442
padding $padding-item
4543
h-box()

packages/@vue/cli-ui/src/components/InstantSearchPagination.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ export default {
5555
</script>
5656

5757
<style lang="stylus" scoped>
58-
@import "~@/style/imports"
59-
6058
.instant-search-pagination
6159
margin $padding-item 0
6260
.content

packages/@vue/cli-ui/src/components/ItemLogo.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ export default {
9898
</script>
9999

100100
<style lang="stylus" scoped>
101-
@import "~@/style/imports"
102-
103101
.item-logo
104102
margin-right $padding-item
105103
position relative

packages/@vue/cli-ui/src/components/ListItemInfo.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ export default {
6060
</script>
6161

6262
<style lang="stylus" scoped>
63-
@import "~@/style/imports"
64-
6563
.list-item-info
6664
v-box()
6765
align-items stretch

packages/@vue/cli-ui/src/components/LoggerMessage.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ export default {
3434
</script>
3535

3636
<style lang="stylus" scoped>
37-
@import "~@/style/imports"
38-
3937
.logger-message
4038
h-box()
4139
align-items baseline

packages/@vue/cli-ui/src/components/LoggerView.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ export default {
111111
</script>
112112

113113
<style lang="stylus" scoped>
114-
@import "~@/style/imports"
115-
116114
.logger-view
117115
background $vue-ui-color-light
118116
height 174px

packages/@vue/cli-ui/src/components/NavContent.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ export default {
2626
</script>
2727

2828
<style lang="stylus" scoped>
29-
@import "~@/style/imports"
30-
3129
.nav-content
3230
width 100%
3331
height 100%

packages/@vue/cli-ui/src/components/NavList.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ export default {
4646
</script>
4747

4848
<style lang="stylus" scoped>
49-
@import "~@/style/imports"
50-
5149
.nav-list
5250
overflow-x hidden
5351
overflow-y auto

packages/@vue/cli-ui/src/components/NpmPackageSearch.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,6 @@ export default {
147147
</script>
148148

149149
<style lang="stylus" scoped>
150-
@import "~@/style/imports"
151-
152150
.npm-package-search
153151
height 100%
154152
display flex

packages/@vue/cli-ui/src/components/PackageSearchItem.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ export default {
111111
</script>
112112

113113
<style lang="stylus" scoped>
114-
@import "~@/style/imports"
115-
116114
.package-search-item
117115
padding $padding-item
118116
h-box()

packages/@vue/cli-ui/src/components/ProgressScreen.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ export default {
7373
</script>
7474

7575
<style lang="stylus" scoped>
76-
@import "~@/style/imports"
77-
7876
.loading-screen
7977
position absolute
8078
z-index 900

packages/@vue/cli-ui/src/components/ProjectDependencyItem.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ export default {
138138
</script>
139139

140140
<style lang="stylus" scoped>
141-
@import "~@/style/imports"
142-
143141
.project-dependency-item
144142
padding $padding-item
145143
cursor default

packages/@vue/cli-ui/src/components/ProjectFeatureItem.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ export default {
3232
</script>
3333

3434
<style lang="stylus" scoped>
35-
@import "~@/style/imports"
36-
3735
.project-feature-item
3836
.vue-ui-switch
3937
padding $padding-item

packages/@vue/cli-ui/src/components/ProjectNav.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,6 @@ export default {
165165
</script>
166166

167167
<style lang="stylus" scoped>
168-
@import "~@/style/imports"
169-
170168
.project-nav
171169
background $vue-ui-color-light-neutral
172170
.vue-ui-dark-mode &

packages/@vue/cli-ui/src/components/ProjectNavButton.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ export default {
8686
</script>
8787

8888
<style lang="stylus" scoped>
89-
@import "~@/style/imports"
90-
9189
$bg = $vue-ui-color-light-neutral
9290
$bg-dark = $vue-ui-color-dark
9391

packages/@vue/cli-ui/src/components/ProjectNavMore.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
</template>
2828

2929
<style lang="stylus" scoped>
30-
@import "~@/style/imports"
31-
3230
.project-nav-more
3331
.vue-ui-dropdown.open .dropdown-trigger .vue-ui-button
3432
&,

packages/@vue/cli-ui/src/components/ProjectPluginItem.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ export default {
138138
</script>
139139

140140
<style lang="stylus" scoped>
141-
@import "~@/style/imports"
142-
143141
.project-plugin-item
144142
padding $padding-item
145143
cursor default

packages/@vue/cli-ui/src/components/ProjectPresetItem.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ export default {
4848
</script>
4949

5050
<style lang="stylus" scoped>
51-
@import "~@/style/imports"
52-
5351
.project-preset-item
5452
padding $padding-item
5553
padding-left 0

packages/@vue/cli-ui/src/components/ProjectSelectList.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,6 @@ export default {
145145
</script>
146146

147147
<style lang="stylus" scoped>
148-
@import "~@/style/imports"
149-
150148
.project-select-list
151149
height 100%
152150
overflow-y auto

packages/@vue/cli-ui/src/components/ProjectSelectListItem.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ export default {
8383
</script>
8484

8585
<style lang="stylus" scoped>
86-
@import "~@/style/imports"
87-
8886
.content
8987
padding $padding-item
9088
display grid

packages/@vue/cli-ui/src/components/ProjectTasksDropdown.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,6 @@ export default {
155155
</script>
156156

157157
<style lang="stylus" scoped>
158-
@import "~@/style/imports"
159-
160158
bullet-color($color)
161159
.bullet
162160
background-color $color

packages/@vue/cli-ui/src/components/Prompt.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ export default {
3434
</script>
3535

3636
<style lang="stylus">
37-
@import "~@/style/imports"
38-
3937
.prompt
4038
list-item()
4139
.prompt-content

packages/@vue/cli-ui/src/components/PromptCheckbox.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ export default {
5959
</script>
6060

6161
<style lang="stylus" scoped>
62-
@import "~@/style/imports"
63-
6462
.prompt-content
6563
v-box()
6664
align-items stretch

packages/@vue/cli-ui/src/components/PromptColor.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ export default {
5353
</script>
5454

5555
<style lang="stylus" scoped>
56-
@import "~@/style/imports"
57-
5856
.color-preview
5957
padding-left $padding-item
6058

packages/@vue/cli-ui/src/components/PromptConfirm.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ export default {
2828
</script>
2929

3030
<style lang="stylus" scoped>
31-
@import "~@/style/imports"
32-
3331
.prompt-confirm
3432
.vue-ui-switch
3533
padding $padding-item

packages/@vue/cli-ui/src/components/PromptError.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ export default {
1919
</script>
2020

2121
<style lang="stylus" scoped>
22-
@import "~@/style/imports"
23-
2422
.prompt-error
2523
padding 0 $padding-item $padding-item
2624

packages/@vue/cli-ui/src/components/PromptsList.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ export default {
7373
</script>
7474

7575
<style lang="stylus" scoped>
76-
@import "~@/style/imports"
77-
7876
.group
7977
margin-bottom ($padding-item * 2)
8078

packages/@vue/cli-ui/src/components/StatusBar.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,6 @@ export default {
184184
</script>
185185

186186
<style lang="stylus" scoped>
187-
@import "~@/style/imports"
188-
189187
.status-bar
190188
position relative
191189
z-index 1

packages/@vue/cli-ui/src/components/StepWizard.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ export default {
5858
</script>
5959

6060
<style lang="stylus" scoped>
61-
@import "~@/style/imports"
62-
6361
.step-wizard
6462
box-sizing border-box
6563

packages/@vue/cli-ui/src/components/SuggestionBar.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@ export default {
9393
</script>
9494

9595
<style lang="stylus" scoped>
96-
@import "~@/style/imports"
97-
9896
.suggestions
9997
h-box()
10098
</style>

packages/@vue/cli-ui/src/components/SuggestionBarItem.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ export default {
105105
</script>
106106

107107
<style lang="stylus" scoped>
108-
@import "~@/style/imports"
109-
110108
.suggestion-details
111109
padding ($padding-item * 2 - 8px) ($padding-item * 2)
112110
box-sizing border-box

packages/@vue/cli-ui/src/components/TaskItem.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ export default {
8181
</script>
8282

8383
<style lang="stylus" scoped>
84-
@import "~@/style/imports"
85-
8684
.task-item
8785
padding $padding-item
8886

packages/@vue/cli-ui/src/components/TerminalView.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,6 @@ export default {
230230
</style>
231231

232232
<style lang="stylus" scoped>
233-
@import "~@/style/imports"
234-
235233
.terminal-view
236234
v-box()
237235
align-items stretch

packages/@vue/cli-ui/src/components/TopBar.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,6 @@ export default {
173173
</script>
174174

175175
<style lang="stylus" scoped>
176-
@import "~@/style/imports"
177-
178176
.top-bar
179177
background $vue-ui-color-light
180178
padding $padding-item

0 commit comments

Comments
 (0)