penetrate

http://www.php.cn/js-tutorial-407854.html

 

 

 

Penetration: vue project we will use scoped achieve modular style, the style of each component to achieve independence, will not affect each other, at this time if the referenced third-party libraries, it repair the ui component style of the time, would have no effect, since its implementation scoped this property is added to each label class name unique children were marked, was able to achieve an independent style, the changes will not take effect, at this time can be used to penetrate to solve

stylus:<<<

sass,less : /deep/

 

 

The principle penetration:

 

 Namely: PostCSS a dom to all components adds a unique dynamic properties, then, to the CSS selectors additionally added a corresponding attribute selector selects the assembly dom, this approach makes the style to act only on the properties comprising the dom-- components inside dom.

 

 

The following methods can be modified to solve invalid style

<style>

/* global styles */写修改ui组件样式的代码

</style>

<style scoped>

/* local styles */写组件样式代码

</style>

Guess you like

Origin www.cnblogs.com/baixiaoxiao/p/10988776.html