~eanyanwu/toph

6365a8d1432d7166a1a56a05f815302bad5f29b7 — Eze 2 months ago 7457570
Include warning regarding setting varialbes on the wrong nodes
1 files changed, 13 insertions(+), 0 deletions(-)

M src/node.rs
M src/node.rs => src/node.rs +13 -0
@@ 199,6 199,19 @@ impl Node {
    /// This is useful for "parameterizing" styles. You can call this method multiple times to
    /// define additional variables.
    ///
    /// If you are writing a component with declarations affecting descendant rules like ...
    ///
    /// ```text
    /// your-component > * {
    ///     blah-blah: var(--your-variable);
    /// }
    /// ```
    ///
    /// ... then you _probably_ intended to call this method on the child nodes.
    ///
    /// Because CSS ... uhh, cascades, calling this method on the parent instead of the child nodes
    /// can cause odd interactions to happen when you nest one `your-component` inside another.
    ///
    /// # Example
    ///
    /// ```