Even as a pretty experienced front-end developer I would often times ask myself “how the heck will I do this”. A lot of that changed with flex box and then css grid. “gap” especially has made is easier the formulate a plan without just poking at CSS and hoping it works.
That said, pretty basic things like truncating text and making sticky components still trips me up every time.
If you have the liberty to limit your team to a subset of modern CSS features that have predictable behavior and patterns of applying styles (like never putting margins directly on a component, always spacing things from the parent; along with a laundry list of other conventions); and your site is designed to not do weird painful stuff (eg masonry layouts, though that should become a native CSS thing soon!) then I find it’s pretty predictable to do 95% of layouts, and only the weird outliers require special sauce. But then again I do a B2B SaaS that doesn’t need to look shockingly sexy, with lots of standard CRUD dashboards so maybe our use case is light on weird CSS tricks required.
I think that's what everyone actually does when doing CSS.
reply