I can't figure out style hover

  • drillean-1355204641855635567

    Isaias

    4 days ago

    When I try to theme my style hover (or any other style besides default), it deselects when I click in anything else besides the div with style itself. I only can get the other element hover separately. I've asked the toddle AI a thousand times and I just can't figure out if I'm doing something wrong or if it is a bug
  • lucasg-1355221262028243154

    Lucas G

    4 days ago

    That is intended.
  • Styles do not collapse/are not shared unless you set child components to inherit parent values
  • That’s how CSS works in general
  • Only some properties like font do inherit by default
  • For an SVG, simply set its stroke/fill values to currentColor for it to inherit color from its parent
  • drillean-1355225982839296070

    Isaias

    4 days ago

    okay that seems to do the trick but it also changes the color of the text, and I'd like them to be different
  • lucasg-1355226561065779273

    Lucas G

    4 days ago

    I would use a <style> element to set descendant selector styles.

    Alternatively, use a variable to track hover and use it to enable classes in the child elements
  • toddle doesn’t yet have descendant selection in the UI so you’d have to use a <style> element to use them but they work nonetheless
  • drillean-1355282129251995921

    Isaias

    4 days ago

    yeah, I think I'll put a pause on this for now 😅 thanks you for the advice tho! I appreciate it. I'll revisit this when I feel I have a better grasp in variables

Stop scrolling. Start building.

toddle is a visual web app builder that rivals custom code — but accessible to your entire team!

Try toddle — it's free!

© Copyright 2024 toddle. All rights reserved.