Components corresponding to the wxss
style file, only the entry into force of nodes within the assembly wxml.
Page components and reference to the component can not use the id selector ( #a
), attribute selectors ( [a]
) and tag name selector, use the class selector.
Child element selector ( .a>.b
) can only be used view
between the component and its child node, the other components may lead to unintended.
Inheritance pattern, such as font
, color
will inherit from the outer component into the assembly.
In addition to inheriting style, the app.wxss
style in the style of the page where the assembly of custom components is not valid (unless you change the style component isolation option).
Summary: use all the custom component class style to set component styles