PricingBlog

How does the "Styles" element work?

  • patrickmast-1280806790971265174

    Patrick Mast

    1 year ago

    We can set CSS style settings in the style element in Toddle. My question is, the CSS settings set in the style element, which element is it targeting? How does the style element know which other element this styling is meant for?
  • andreasmoller-1280809498340102267

    Andreas Møller

    1 year ago

    It is just a normal style element form html. You add all the selectors etc.
  • Only use it if you have no other option.
  • patrickmast-1280820281417662515

    Patrick Mast

    1 year ago

    Ok, thanks @Andreas Møller. Can I use the styles element to set the font for a textarea? And have a "Show" formula that only "Shows" this element if the font in the styles is selected? This can be a solution for this question? https://discord.com/channels/972416966683926538/1279865087867224156
  • zacharybydesign-1280943887422066743

    Zachary

    1 year ago

    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier', monospace
    for eg, but i think better to have loaded in the header first (?? not sure)
  • patrickmast-1281196402931798090

    Patrick Mast

    1 year ago

    @Andreas Møller, @Zachary works great now, thanks for the tips! 💪