Automatically Contrasted Colors

By Chris Coyier on

What is a good contrast text color on a black background? White. What about on a white background? Black. What about on #f06d06? Less clear. Devon Govett posted a good trick to having CSS pick for you, which works across browsers today. Lea Verou has a much deeper dive. There is supposed to be a […]

Authors Together

By Chris Coyier on

Authors Together: In 2024, A Book Apart closed its doors after publishing a much-loved collection of more than 50 brief books for people who make websites. The rights to each book have reverted to the authors — hi, that’s us — and we’ve put together this semi-official directory to help you find our books in their new […]

The Logical Border Radius Equivalents

By Chris Coyier on

I find this hard to remember and it’s come up for me a few times lately so I’m writing it down gosh darn it! The individual corner border-radius values, like border-top-right-radius (which is hard enough to remember on its own) have logical property versions, meaning that should the flow of the document change, the border […]

AI for Web Work

By Chris Coyier on

Kevin Powell pitted several AI models against each other in a video focused on CSS questions and found Claude to be the best. I think a ton of coding usage of AI is in VS Code which leans Microsoft Copilot which uses GPT-4o by default although you can change it in the UI, so it […]

background-clip: border-area;

By Chris Coyier on

Jen Simmons introduces the hot-off-the-presses background-clip: border-area; which can produce some pretty compelling and real-world designs with a few lines of sensible CSS. I suspect our recent background-clip trickery would be simplified with this new value because we wouldn’t have to put a fake background over the padding-box to get the effect.