Here’s some articles that I’ve enjoyed reading this week.
📐 HTML vs Body: How to Set Width and Height for Full Page Size
For years, we had set
height: 100%; on the
html element and
min-height: 100%; for the
body in our base stylesheet. This week, I discovered something weird, though, where the margin-bottom of a footer was being removed in some browsers. This made me investigate a bit, which is how I found this article by Dave Gray, explaining why and how to set the height for a full page size properly. Fixed my problem and learned something in the process.
🎚 Theme Toggles
A nice collection of animated theme toggles for your dark mode toggle. All of them come with the HTML (or react) code you need to use them in your project. Reminds me to finally implement a dark mode on this very site.
🎨 Using theme.json in Classic Themes
Using theme.json in a theme is a great way to start using and customizing the block editor without fully opting into the fullsite-editing side of things. It’s pretty much what we are doing for a while now with our new client work and this tutorial on learn.wordpress.org by Jonathan Bossenger is a very good introduction to get you started.
👩💻 Favourite PHP functions
Did you know there’s a php function that tells you what date easter is this year? Or one that can return the time of sunset and sunrise, if you give it some coordinates? A collection of some funny php functions I’ve never heard of.
🎶 Googles AI that can generate music from text prompts
These demo tunes are pretty crazy.