Relative Styling
Last updated
Was this helpful?
Last updated
Was this helpful?
In Cwicly, relative styling refers to the exclusive feature where you, the builder, can target the style of children blocks from the parent block, and modify their styles from said parent’s editor panel. Any and every block can be targeted in the rule editor.
Basically, it is visual CSS Rules.
You no longer need to write CSS and code blindly when trying to apply styling from blocks.
In layman terms, to illustrate this term let’s use the example of genetics. If two parents are redheads, their child will receive the redhead gene. So a gene/style is exclusively passed down/targetable from the parent.
This setting can be enabled by default from the Global Styles > Backend tab
In the Relative Styling rules, you can manually write your own rules.
This allows even more flexibility, as you can place your .blockclass and :pseudos selectors wherever you want in the rule.
Both the .blockclass and :pseudos selectors are proposed.
.blockclass : placeholder which automatically replaces the current block's class or global class (depending on what you're editing)
:pseudos : automatically replaced with the pseudo classes that have styles applied to them, from the Relative Styling editor.
Useful list of Relative Style rules that we commonly use.
Descendant " "
Class
child-class-name-here
--
Class
selected
--
Attribute
disabled