Logical Properties for Useful Shorthands | CSS-Tricks

Michelle Barker with my favorite sorta blog post: short, practical, and leaves you with a valuable nugget for your time. Here, she gets into logical property shorthands in CSS, particularly those that set lengths just on a single axis, say only the block (vertical) axis or just the inline (horizontal) axis. I say “block” and ”inline” because, as far as logical properties are concerned, the x-axis could just as well

Read More

Collective Nouns for the Web | CSS-Tricks

Melanie Sumner has this super-specific collection of web-related nouns for describing a group or set of something. You know how there’s a school or fish or a herd of cows? Same sort of thing, but for funny web jargon. Things like: A vanity is ten (10) or more domains owned by a single person, where very few are in use. A parade of RSS feeds is when you have so many RSS feeds that

Read More

How stroke-dasharray Patterns Work | CSS-Tricks

Say you have a line in SVG: <svg> <line x1=”0″ y1=”30″ x2=”500″ y2=”30″ stroke-color=”#f8a100″ /> </svg> You can use the stroke-dasharray property in CSS to make dashes: line { stroke-dasharray: 5; } That 5 value is a relative unit based on the size of the SVG’s viewBox. We could use any CSS length, really. But what it does is make a pattern of dashes that are 5 units long with 5 unit gaps between them.

Read More

Office Spaces | CSS-Tricks – CSS-Tricks

I think it’s super timely that Jim Nielson wrote about his office space the other day. My family recently re-rooted in Colorado and I was up late last night setting up my desk and everything around it. So late, in fact, that reading these words now bites me: My workspace isn’t what life revolves around. I’ve spent years trying to live up to that. I remember how important my desk

Read More

React Hooks: The Deep Cuts | CSS-Tricks

Hooks are reusable functions. They allow you to use state and other features (e.g. lifecycle methods and so on) without writing a class. Hook functions let us “hook into” the React state lifecycle using functional components, allowing us to manipulate the state of our functional components without needing to convert them to class components. React introduced hooks back in version 16.8 and has been adding more ever since. Some are

Read More

In Praise of Shadows | CSS-Tricks

Our dear friend Robin has a new essay called In Praise of Shadows. Now, before you hop over there looking for nuggets on CSS box shadows, text shadows, and shadow filters… this is not that. It’s an essay on photography and what Robin has learned about handing shadows with a camera. So, why share this? Because it’s cool as heck that he made an article directed page dedicated to one

Read More

Technical Writing for Developers | CSS-Tricks

HTML, CSS, JavaScript, Python, PHP, C++, Dart — there are so many programming languages out there and you may even be totally fluent in several of them! But as we aim to write more and better code, the way we write and communicate in everyday language becomes more and more important… and perhaps even overlooked. The way we write about and around code is arguably as important as the code

Read More

My Dumbest CSS Mistakes | CSS-Tricks

We all make mistakes in our code. It happens! I know if I had one of those “Days Since Last Mistake” signs hanging over my desk, a big ol’ goose egg would be hovering above me all the time. It doesn’t have to be big mistakes, either. My clumsy self has committed small errors to repos ranging from typos all the way to complete npm module directories. Whooooooops. That’s one

Read More

Text-overflow: ellipsis considered harmful | CSS-Tricks

Eric Eggert: There are a few legitimate use cases for this technique. For example, you might have a table with titles and descriptions. To preserve more space for the title, you constrain the description to one line on small viewports to the one-line and you repeat the description on the detail page for this item. However, I often see it used on items like buttons or even form labels to

Read More

Single Element Loaders: Going 3D! | CSS-Tricks

For this fourth and final article of our little series on single-element loaders, we are going to explore 3D patterns. When creating a 3D element, it’s hard to imagine that just one HTML element is enough to simulate something like all six faces of a cube. But  maybe we can get away with something more cube-like instead by showing only the front three sides of the shape — it’s totally possible and that’s what we’re going to do together. The split cube loader Here is

Read More