refactor: automatically inject @/style/imports using import option provided by stylus loader (#2515)

This commit is contained in:
Damian Stasik
2018-10-15 17:02:48 +02:00
committed by Haoqun Jiang
parent 9357a608f2
commit 30d46ffc30
58 changed files with 10 additions and 115 deletions

View File

@@ -34,8 +34,6 @@ export default {
</style>
<style lang="stylus" scoped>
@import "~@/style/imports"
.app
display flex
flex-direction column

View File

@@ -39,8 +39,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.loading
v-box()
box-center()

View File

@@ -38,8 +38,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.configuration-item
padding $padding-item

View File

@@ -31,8 +31,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.content
display flex
align-items center

View File

@@ -25,8 +25,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.content-view
height 100%

View File

@@ -103,8 +103,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
status-color($color)
.name
color $color

View File

@@ -76,8 +76,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.file-diff-change
font-family $font-mono
font-size 12px

View File

@@ -22,8 +22,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.file-diff-chunk
.changes
overflow-x auto

View File

@@ -247,8 +247,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.file-diff-view
v-box()
height 100%

View File

@@ -399,8 +399,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.toolbar
padding $padding-item 0
h-box()

View File

@@ -38,8 +38,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.folder-explorer-item
padding $padding-item
h-box()

View File

@@ -55,8 +55,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.instant-search-pagination
margin $padding-item 0
.content

View File

@@ -98,8 +98,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.item-logo
margin-right $padding-item
position relative

View File

@@ -60,8 +60,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.list-item-info
v-box()
align-items stretch

View File

@@ -34,8 +34,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.logger-message
h-box()
align-items baseline

View File

@@ -111,8 +111,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.logger-view
background $vue-ui-color-light
height 174px

View File

@@ -26,8 +26,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.nav-content
width 100%
height 100%

View File

@@ -46,8 +46,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.nav-list
overflow-x hidden
overflow-y auto

View File

@@ -147,8 +147,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.npm-package-search
height 100%
display flex

View File

@@ -111,8 +111,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.package-search-item
padding $padding-item
h-box()

View File

@@ -73,8 +73,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.loading-screen
position absolute
z-index 900

View File

@@ -138,8 +138,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.project-dependency-item
padding $padding-item
cursor default

View File

@@ -32,8 +32,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.project-feature-item
.vue-ui-switch
padding $padding-item

View File

@@ -165,8 +165,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.project-nav
background $vue-ui-color-light-neutral
.vue-ui-dark-mode &

View File

@@ -86,8 +86,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
$bg = $vue-ui-color-light-neutral
$bg-dark = $vue-ui-color-dark

View File

@@ -27,8 +27,6 @@
</template>
<style lang="stylus" scoped>
@import "~@/style/imports"
.project-nav-more
.vue-ui-dropdown.open .dropdown-trigger .vue-ui-button
&,

View File

@@ -138,8 +138,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.project-plugin-item
padding $padding-item
cursor default

View File

@@ -48,8 +48,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.project-preset-item
padding $padding-item
padding-left 0

View File

@@ -145,8 +145,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.project-select-list
height 100%
overflow-y auto

View File

@@ -83,8 +83,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.content
padding $padding-item
display grid

View File

@@ -155,8 +155,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
bullet-color($color)
.bullet
background-color $color

View File

@@ -34,8 +34,6 @@ export default {
</script>
<style lang="stylus">
@import "~@/style/imports"
.prompt
list-item()
.prompt-content

View File

@@ -59,8 +59,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.prompt-content
v-box()
align-items stretch

View File

@@ -53,8 +53,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.color-preview
padding-left $padding-item

View File

@@ -28,8 +28,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.prompt-confirm
.vue-ui-switch
padding $padding-item

View File

@@ -19,8 +19,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.prompt-error
padding 0 $padding-item $padding-item

View File

@@ -73,8 +73,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.group
margin-bottom ($padding-item * 2)

View File

@@ -184,8 +184,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.status-bar
position relative
z-index 1

View File

@@ -58,8 +58,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.step-wizard
box-sizing border-box

View File

@@ -93,8 +93,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.suggestions
h-box()
</style>

View File

@@ -105,8 +105,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.suggestion-details
padding ($padding-item * 2 - 8px) ($padding-item * 2)
box-sizing border-box

View File

@@ -81,8 +81,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.task-item
padding $padding-item

View File

@@ -230,8 +230,6 @@ export default {
</style>
<style lang="stylus" scoped>
@import "~@/style/imports"
.terminal-view
v-box()
align-items stretch

View File

@@ -173,8 +173,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.top-bar
background $vue-ui-color-light
padding $padding-item

View File

@@ -24,8 +24,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.view-badge
.content
font-size 12px

View File

@@ -1,5 +1,4 @@
@import '~prismjs/themes/prism.css'
@import 'imports'
html,
body,
@@ -166,7 +165,7 @@ ansi-colors('white', $vue-ui-color-light)
.vue-ui-dark-mode
.token.property, .token.tag, .token.boolean, .token.number, .token.constant, .token.symbol, .token.deleted
color lighten(#905, 40%)
.token.selector, .token.attr-name, .token.string, .token.char, .token.builtin, .token.inserted
color lighten(#690, 40%)
@@ -178,6 +177,6 @@ ansi-colors('white', $vue-ui-color-light)
.token.operator, .token.entity, .token.url, .language-css .token.string, .style .token.string
color lighten(#9a6e3a, 20%)
.token.punctuation
color lighten(#999, 20%)

View File

@@ -53,8 +53,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.about
padding 42px
max-width 840px

View File

@@ -7,8 +7,6 @@
</template>
<style lang="stylus" scoped>
@import "~@/style/imports"
.not-found
v-box()
box-center()

View File

@@ -175,8 +175,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.project-configuration-details
v-box()
align-items stretch

View File

@@ -99,8 +99,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.project-configurations
.content-view /deep/ > .content
overflow-y hidden

View File

@@ -688,8 +688,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.project-create
display grid
grid-template-columns 1fr

View File

@@ -209,8 +209,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.project-dependencies
.content-view /deep/ > .content
overflow-y auto

View File

@@ -41,8 +41,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.project-home
display flex
flex-direction column

View File

@@ -114,8 +114,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.project-plugins
.content-view /deep/ > .content
overflow-y auto

View File

@@ -255,8 +255,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.project-plugins-add
display grid
grid-template-columns 1fr

View File

@@ -171,8 +171,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.folder-explorer
height 100%

View File

@@ -334,8 +334,6 @@ export default {
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.project-task-details
v-box()
align-items stretch

View File

@@ -23,5 +23,13 @@ module.exports = {
}
})
)
},
css: {
loaderOptions: {
stylus: {
import: ['~@/style/imports']
}
}
}
}