Templates 如何在Jade中嵌入转义的scss代码
我正在使用prepos编译*.jade模板 当前翡翠代码:Templates 如何在Jade中嵌入转义的scss代码,templates,pug,prepros,Templates,Pug,Prepros,我正在使用prepos编译*.jade模板 当前翡翠代码: pre code.hljs .ui-button { @include button; &.xs {@include button-size(xs);} &.sm {@include button-size(sm);} &.md {@include button-size(md);} &.lg {@include button-siz
pre
code.hljs
.ui-button {
@include button;
&.xs {@include button-size(xs);}
&.sm {@include button-size(sm);}
&.md {@include button-size(md);}
&.lg {@include button-size(lg);}
&.xl {@include button-size(xl);}
&.xxl {@include button-size(xxl);}
}
<pre>
<code class="hljs">
.ui-button {
@include button;
&.xs {@include button-size(xs);}
&.sm {@include button-size(sm);}
&.md {@include button-size(md);}
&.lg {@include button-size(lg);}
&.xl {@include button-size(xl);}
&.xxl {@include button-size(xxl);}
}
</code>
</pre>
预期结果:
pre
code.hljs
.ui-button {
@include button;
&.xs {@include button-size(xs);}
&.sm {@include button-size(sm);}
&.md {@include button-size(md);}
&.lg {@include button-size(lg);}
&.xl {@include button-size(xl);}
&.xxl {@include button-size(xxl);}
}
<pre>
<code class="hljs">
.ui-button {
@include button;
&.xs {@include button-size(xs);}
&.sm {@include button-size(sm);}
&.md {@include button-size(md);}
&.lg {@include button-size(lg);}
&.xl {@include button-size(xl);}
&.xxl {@include button-size(xxl);}
}
</code>
</pre>
.ui按钮{
@包括按钮;
&;.xs{@include按钮大小(xs);}
&;.sm{@include按钮大小(sm);}
&;.md{@include按钮大小(md);}
&;.lg{@include按钮大小(lg);}
&;.xl{@include按钮大小(xl);}
&;.xxl{@include按钮大小(xxl);}
}
回答:
pre
code.hljs
.ui-button {
@include button;
&.xs {@include button-size(xs);}
&.sm {@include button-size(sm);}
&.md {@include button-size(md);}
&.lg {@include button-size(lg);}
&.xl {@include button-size(xl);}
&.xxl {@include button-size(xxl);}
}
<pre>
<code class="hljs">
.ui-button {
@include button;
&.xs {@include button-size(xs);}
&.sm {@include button-size(sm);}
&.md {@include button-size(md);}
&.lg {@include button-size(lg);}
&.xl {@include button-size(xl);}
&.xxl {@include button-size(xxl);}
}
</code>
</pre>
CSS代码不需要代码转义
回答:
pre
code.hljs
.ui-button {
@include button;
&.xs {@include button-size(xs);}
&.sm {@include button-size(sm);}
&.md {@include button-size(md);}
&.lg {@include button-size(lg);}
&.xl {@include button-size(xl);}
&.xxl {@include button-size(xxl);}
}
<pre>
<code class="hljs">
.ui-button {
@include button;
&.xs {@include button-size(xs);}
&.sm {@include button-size(sm);}
&.md {@include button-size(md);}
&.lg {@include button-size(lg);}
&.xl {@include button-size(xl);}
&.xxl {@include button-size(xxl);}
}
</code>
</pre>
CSS代码不需要代码转义