CSS Memes Debunked is a (small) collection of CodePen demos debunking a few of the myths/memes around CSS. Take this golden oldie for example: Using modern CSS (and a modern browser), this can be solved 🙂 CSS Memes Debunked →
Tag Archives: css
Conditions for CSS Calculations
In CSS we have feature queries (@supports) available to create if–else-like structs. What if we could extend our means of using conditions in CSS? Roman Komarov provides us with a clever technique – which involves using CSS Custom Properties, calc(), and some binary logic – to implementing this type of conditions on a per CSS …
Using Object.assign() to quickly set multiple inline styles
Since an HTMLElement its CSSStyleDeclaration (viz. its style property) essentially is an Object, it’s perfectly possible to pass it as the target object into Object.assign() along with a few other objects. The result is that all keys from those extra objects will be merged as CSS properties along with their values on the currently applied …
Continue reading “Using Object.assign() to quickly set multiple inline styles”
Front-end Style Guides – Creating and Maintaining Style Guides for Websites
Anna Debbenham – creator of styleguides.io – wrote a book on … Style Guides: Designers and developers have taken different approaches to putting together their own web-based style guides. This book highlights the various techniques and the projects that have used them. It’s packed with practical tips, whether you’re starting from scratch or assembling one …
Continue reading “Front-end Style Guides – Creating and Maintaining Style Guides for Websites”
Harry Roberts: Refactoring CSS Without Losing Your Mind
From Pages to Patterns
Video of Charlotte Jackson’s talk at Beyond Tellerrand on how to adopt pattern thinking to developing a pattern library/styleguide: This talk will look at how we can help everyone in the team adopt pattern thinking. This includes anyone with a decision to make—not just designers and developers. The whole team can start developing a shared …
10 principles for smooth web animations
Don’t change any properties besides opacity or transform! Hide content in plain sight with opacity: 0; and pointer-events: none; Don’t animate everything at the same time Slightly increasing transition delays makes it easy to choreograph motion Use a global multiplier to design in slow motion (and then speed everything up later) Take videos of your …
CSS Grid, Flexbox And Box Alignment: Our New System For Web Layout
Time to ramp up your CSS Grid Layout skills, as it’s now enabled by default in Chrome Canary: Boom! There it is. Latest Chrome Canary now has Grid Layout enabled by default. It’s on the way. pic.twitter.com/sUNOZKVUlH — Rachel Andrew (@rachelandrew) November 25, 2016 It’ll also land in Firefox 52. Speaking of, Firefox also sports …
Continue reading “CSS Grid, Flexbox And Box Alignment: Our New System For Web Layout”
Minimize FOUT with Font Style Matcher
Great tool by Monica Dinculescu (@notwaldorf): If you’re using a web font, you’re bound to see a flash of unstyled text (or FOUC), between the initial render of your websafe font and the webfont that you’ve chosen. This usually results in a jarring shift in layout, due to sizing discrepancies between the two fonts. To …
Working with Print Stylesheets
Often forgotten, but no less important: print styles. This post provides a nice summary of some simple things you can do to give your print layout some love. A small collection of useful CSS techniques and a quick reminder that print style sheets are still a thing. I totally forgot about print style sheets →