WordPress theme json units and spacing scale

Поділитися
Вставка
  • Опубліковано 2 жов 2024

КОМЕНТАРІ • 5

  • @JasonKingston
    @JasonKingston Місяць тому +3

    Thanks Elliott. I'm really enjoying this series on theme.json. Great value on these tips and overriding the core defaults. Any plans to do something on intrinsic design and theme.json with the clamp and math functions?

    • @elliottrichmondwp
      @elliottrichmondwp  Місяць тому +1

      That’s a great question! As you probably know, WordPress core already handles many intrinsic techniques out of the box, especially with container blocks. However, theme authors can also add their own custom techniques in the theme.json file. I’ve already touched on this with fluid font sizes in a previous video, which you can check out here: ua-cam.com/video/BXmgUHbZnpU/v-deo.htmlsi=DU1M8mz7gQg3oBJ0.
      In the video you commented on, I demonstrated the spacingScale at an entry level. My next video will cover spacingSizes, where I will further explore intrinsic methods. Although it’s a macro-level topic, it’s actually very global because space and spacing are fundamental elements in any theme, right? 😇
      With that said, did you have anything specific in mind? I’m happy to consider creating content on this, but it might not fit within this series, which focuses on a broader study of the theme.json file settings and styles.

    • @JasonKingston
      @JasonKingston Місяць тому

      @@elliottrichmondwp I'm mostly just trying to nail down how to make containers break in a more natural way with intrinsic design so I don't have to rely as much on CSS media queries for different screen sizes.

  • @TheBeeOBee
    @TheBeeOBee Місяць тому +1

    I wish spacing scale could be fluid somehow. I like designing with scales, and just create my own fluid ones. I actually have 1.125, 1.2, 1.25, 1.333, 1.5, 1.666, and golden ratio all ready to go for spacing and font sizes in theme.json. My fluid settings are 1rem to 1.25rem (16px on mobile to 20px on desktop). Someday I hope to make a little theme.json generator so I don't have to do this work manually, and can change some of the variables a bit more.

    • @elliottrichmondwp
      @elliottrichmondwp  Місяць тому

      That’s pretty cool, would love to see your solution, I think you can achieve this with a combo of setting spacingScale and spacingSizes no? It’s lined up for my next video so watch this space 👍