I'm a big believer in working efficiently so I don't have to work too hard. From time and project management, to the CSS and HTML I write, efficiency is key to me having a life outside of work.
When I worked for the corporate dooshes, efficiency was often talked about during the oh–so–efficient "town hall meetings," but rarely encouraged in practice. Instead, the corporate mentality of getting it done regardless of whether it was done right prevailed. And I spent hours, days and weeks cleaning up CSS and HTML that my former employer frequently outsourced to agencies who only understood tag soup, div-itis and class-itis.
If I had a penny for every convoluted selector that could've been replaced with an advanced selector, I'd be a very rich woman today. Instead, I'm now freelance, where I get to be as efficient as I want, particularly with my CSS.
Attribute Selectors
One of the ways I'm getting more efficient with my CSS these days is by using "advanced" selectors. Attribute selectors, specifically, have become a very common part of my CSS arsenal. I love how they target elements without me having to include any class
or id
values. They simply rely on the attributes I'm already assigning in my markup for content — rather than presentational — purposes.
If you want to learn more, check out my latest article about attribute selectors for Script Junkie.
♥ Share the Love