PricingBlog

body bg?

  • nathandh.-1270210648348950580

    nathandh

    1 year ago

    Is there a concept of a <body> in toddle? I'm wondering if there's a way to set a bg color for the whole canvas, or padding for every element, etc.

    Should I always plan to just have a global parent div as a starting point and put everything inside there?
  • lucasg-1270211752973434951

    Lucas G

    1 year ago

    A few ways you could go about it
  • Applying the bg to the base div would do it
  • lucasg-1270212368307327006

    Lucas G

    1 year ago

    You could add styles to the header as well
  • And you could go the base component route as well which can double up to include APIs that you need often
  • nathandh.-1270212970194145334

    nathandh

    1 year ago

    Ah OK so the base div is always there, and you can't delete it, didn't realize that.
  • lucasg-1270213532360638465

    Lucas G

    1 year ago

    You can’t delete it but you can change its tag
    👍🏼1
  • For example to <main>