使用css变量来自由操作
:root {
--button-height: 32px;
--font-size: 14px;
--button-bg: white;
--button-active-bg: #eee;
--bordor-radius: 4px;
--color: #333;
--border-color: #999;
--border-color-hover: #666;
}
<style lang="scss">
.g-button {
font-size: var(--font-size);
height: var(--button-height);
padding: 0 1em;
border-radius: var(--bordor-radius);
border: 1px solid var(--border-color);
background: var(--button-bg);
&:hover {
border-color: var(--border-color-hover);
}
&:active {
background-color: var(--button-active-bg);
}
&:focus {
outline: none;
}
}
</style>
No entres found 报错
./node_modules/.bin/parcel
改成
./node_modules/.bin/parcel index.html
npx parcel
改成
npx parcel index.html
Vue报错
再次运行的时候
./node_modules/.bin/parcel index.html --no-cache //(不用之前的缓存)
或者
rm -rf .cache //(删掉缓存)