Update 4 for SkeletonCSS

Week 278 was posted by Charanjit Chana on 2023-02-20.

It's been about a year since I updated SkeletonCSS, mainly to change the way in which some of the top level elements are positioned. It's not unusual to want a layout that spreads out to the width of the browser but have the content centred. It's a layout I've built countless times but it always felt like a workaround and/or involved media queries.

I thought about it some more recently as part of some updates to Good Gear Club where I got it working thanks to calc() but it dawned on me that I should probably be looking at making use of CSS' min or max functions. The padding will be at least 16px, but will stretch to be half of the view-width minus the max-width. This gives a nice balance on each side and is an alternative to the usual approach of using margin: 0 auto;

The latest changes to SkeletonCSS

You can see details of the changes over on the SkeletonCSS Github page.

Tags: css, skeletoncss

Tweet WhatsApp Keep Upvote Digg Tumblr Pin Blogger LinkedIn Skype LiveJournal Like