Component Prop (style), wrapped by <style></style> tags in the .gen file, are used to write component Prop.
The prop part will be merged into the component during compilation and indexed by id or class.
$style_ident: property identifier (idorclass)$prop_key: property$prop_value: property value
<style>In <style>
# index component id. index component classThe weighting principle of attributes is very simple. The deeper the nesting, the greater the weight value. The greater the weight value, the higher the attribute priority.
In the above example, there are two .my_label, of which 2️⃣ has a greater weight value than 1️⃣ and a higher priority. Therefore, when they have the same attribute color, color: #f4b177; is used, which has a higher priority.
The attribute merging principle applies to class. When there are multiple classs with the same name, the attributes in these classs will be merged into one class and also follow the weight principle.
As above, according to the merging principle, all the attributes of .my_label are finally: