Search
Change Color of SVG on Hover
13.5.2019
There are a lot of different ways to use SVG. Depending on which way, the tactic for recoloring that SVG in different states or conditions — :hover, :active, :focus, class name change, etc. — is different.
Let's look at the ways.
Inline SVG
Inline SVG is my favorite way to use...
SVG Properties and CSS
13.5.2019
There are many Scalable Vector Graphics (SVG), but only certain attributes can be applied as CSS to SVG. Presentation attributes are used to style SVG elements and can be used as CSS properties. Some of these attributes are SVG-only while others are already shared in CSS, such as font-size...
Deploying a Client-Side Rendered create-react-app to Microsoft Azure
10.5.2019
Deploying a React app to Microsoft Azure is simple. Except that... it isn’t. The devil is in the details. If you're looking to deploy a create-react-app — or a similar style front-end JavaScript framework that requires pushState-based routing — to Microsoft Azure, I believe this article will serve...
Weekly Platform News: Feature Policy, Signed Exchanges, iOS browsers
10.5.2019
👋 Hey folks! This is the first edition of a new weekly update we'll be posting that covers timely news at the intersection of development standards and the tools that make them available on the web. We often talk about the pace of change in our industry. It's fast and touches everything...
CSS-Tricks Chronicle XXXV
10.5.2019
I like to do these little roundups of things going on with myself, this site, and the other sites that are part of the CSS-Tricks family.
I spoke at Smashing Conf San Francisco.
There's a video! I can't embed it here because of privacy settings or something, so here's a link to the Vimeo.
It's...
Collective #514
9.5.2019
Hybrid Lazy Loading * SVG Will Save Us * enFont Terrible * cssfx * Formation * CSS-Only Chat
Collective #514 was written by Pedro Botelho and published on Codrops
The Thinking Behind Simplifying Event Handlers
9.5.2019
Events are used to respond when a user clicks somewhere, focuses on a link with their keyboard, and changes the text in a form. When I first started learning JavaScript, I wrote complicated event listeners. More recently, I've learned how to reduce both the amount of code I write and the number...
A responsive grid layout with no media queries
9.5.2019
Andy Bell made a really cool demo that shows us how to create a responsive grid layout without any media queries at all. It happens to look like this when you change the size of the browser window:
I think this is a wonderful layout technique that’s just 6 lines (!) of CSS.
.auto-grid...
The Impact of Team Collaboration and Communication on Projects
9.5.2019
(This is a sponsored post.)
The CSS-Tricks team was cracking up the other day when Miranda introduced us to something called "swoop and poop." That was a new term for most of us, but tell me if you've ever experienced this for yourself.
The idea is that someone in an organization — usually...
A Few Functional Uses for Intersection Observer to Know When an Element is in View
8.5.2019
You might not know this, but JavaScript has stealthily accumulated quite a number of observers in recent times, and Intersection Observer is a part of that arsenal. Observers are objects that spot something in real-time — like birdwatchers going to their favorite place to sit and wait for the birds...
Getting To Know The MutationObserver API
8.5.2019
MutationObserver watches the DOM, specifically the places you tell it to, like:
document.querySelector('#watch-this');
...and it can tell you (trigger a callback) when stuff happens — like when a child is added, removed, changed, or a number of other things.
I used it just the other day...
Why, How, and When to Use Semantic HTML and ARIA
7.5.2019
Semantic HTML and Accessible Rich Internet Applications (ARIA) help create interfaces that work for everyone in the most performant, robust, and simple way possible. They add essential meaning to your content, which lets web browsers, search engines, screen readers, RSS readers, and ultimately...
The Place of UX
7.5.2019
Every time "UX" comes out of my mouth or is typed by my fingers, I think, "did I just use that term correctly?" It feels like such a big and loaded term these days, that perhaps the way I use it only contributes to the confusion. Ryan Singer frames that problem well:
Debates continue to rage about...
A CSS Golfing Exercise
6.5.2019
Code golfing is a type of programming where the goal is to accomplish a task using as few bytes as possible. CSSBattle is a code golfing battleground where players complete to recreate target images using CSS and HTML.
The rules are fairly simple:
No external resources (sorry, no <img...
A Conspiracy to Kill IE6
6.5.2019
Chris Zacharias published a few notes about why the team at YouTube added a banner that asked users to switch from IE6 to a more modern browser back in 2009:
The bittersweet consequence of YouTube’s incredible growth is that so many stories will be lost underneath all of the layers of new paint....
Making the Move from jQuery to Vue
3.5.2019
As someone who has used jQuery for many. years and has recently become a Vue convert, I thought it would be an interesting topic to discuss the migration process of working with one to the other.
Before I begin though, I want to ensure one thing is crystal clear. I am not, in any way whatsoever...
Currently Reading: Progressive Web Apps by Jason Grisby
3.5.2019
I’ve been reading Jason Grigsby’s new book on progressive web apps this past week and it’s exciting. Jason explains what PWAs are and how they work while while doing a bang-up job covering the business case for using them them, too. But perhaps you might be thinking that a PWA isn’t necessary...
Split
2.5.2019
Jeremy on the divide between the core languages of the web, and all the tooling that exists to produce code in those languages:
On the one hand, you’ve got the raw materials of the web: HTML, CSS, and JavaScript. This is what users will ultimately interact with.
On the other hand, you’ve got...
Making Web Components for Different Contexts
2.5.2019
This article isn’t about how to build web components. Caleb Williams already wrote a comprehensive guide about that recently. Let’s talk about how to work with them, what to consider when making them, and how to embrace them in your projects.
If you are new to web components, Caleb’s guide is...
Easily Turn Your Photos into Vectors with Photo Vectorizer
2.5.2019
(This is a sponsored post.)
Photo Vectorizer is a simple-to-use Photoshop action that can convert any photo into a vector. With just a few clicks of your mouse, you can save tons of time and frustration by turning your photos into vectors. With super sharp results, these vectors are great for...