File tree 2 files changed +73
-3
lines changed
packages/@vue/cli-service/generator/template/src
2 files changed +73
-3
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,16 @@ export default {
28
28
</template>
29
29
<%_ } _%>
30
30
31
- <style>
31
+ <%_ if (rootOptions.cssPreprocessor !== 'stylus') { _%>
32
+ <style<%-
33
+ rootOptions.cssPreprocessor
34
+ ? ` lang="${
35
+ rootOptions.cssPreprocessor === 'sass'
36
+ ? 'scss'
37
+ : rootOptions.cssPreprocessor
38
+ }"`
39
+ : ``
40
+ %>>
32
41
#app {
33
42
font-family: 'Avenir', Helvetica, Arial, sans-serif;
34
43
-webkit-font-smoothing: antialiased;
@@ -40,7 +49,7 @@ export default {
40
49
<%_ } _%>
41
50
}
42
51
<%_ if (rootOptions.router) { _%>
43
-
52
+ <%_ if (!rootOptions.cssPreprocessor) { _%>
44
53
#nav {
45
54
padding: 30px;
46
55
}
@@ -53,5 +62,40 @@ export default {
53
62
#nav a.router-link-exact-active {
54
63
color: #42b983;
55
64
}
65
+ <%_ } else { _%>
66
+ #nav {
67
+ padding: 30px;
68
+ a {
69
+ font-weight: bold;
70
+ color: #2c3e50;
71
+ &.router-link-exact-active {
72
+ color: #42b983;
73
+ }
74
+ }
75
+ }
76
+ <%_ } _%>
77
+ <%_ } _%>
78
+ </style>
79
+ <%_ } else { _%>
80
+ <style lang="stylus">
81
+ #app
82
+ font-family 'Avenir', Helvetica, Arial, sans-serif
83
+ -webkit-font-smoothing antialiased
84
+ -moz-osx-font-smoothing grayscale
85
+ text-align center
86
+ color #2c3e50
87
+ <%_ if (!rootOptions.router) { _%>
88
+ margin-top 60px
89
+ <%_ } _%>
90
+ <%_ if (rootOptions.router) { _%>
91
+
92
+ #nav
93
+ padding 30px
94
+ a
95
+ font-weight bold
96
+ color #2c3e50
97
+ &.router-link-exact-active
98
+ color #42b983
56
99
<%_ } _%>
57
100
</style>
101
+ <%_ } _%>
Original file line number Diff line number Diff line change @@ -40,7 +40,16 @@ export default {
40
40
</script >
41
41
42
42
<!-- Add "scoped" attribute to limit CSS to this component only -->
43
- <style scoped>
43
+ <%_ if (rootOptions.cssPreprocessor !== 'stylus') { _%>
44
+ <style scoped<%-
45
+ rootOptions.cssPreprocessor
46
+ ? ` lang="${
47
+ rootOptions.cssPreprocessor === 'sass'
48
+ ? 'scss'
49
+ : rootOptions.cssPreprocessor
50
+ }"`
51
+ : ``
52
+ %>>
44
53
h3 {
45
54
margin: 40px 0 0;
46
55
}
56
65
color: #42b983;
57
66
}
58
67
</style>
68
+ <%_ } else { _%>
69
+ <style scoped lang="stylus">
70
+ h3
71
+ margin 40px 0 0
72
+
73
+ ul
74
+ list-style-type none
75
+ padding 0
76
+
77
+ li
78
+ display inline-block
79
+ margin 0 10px
80
+
81
+ a
82
+ color #42b983
83
+ </style>
84
+ <%_ } _%>
You can’t perform that action at this time.
0 commit comments