Search
The Many Ways to Include CSS in JavaScript Applications
8.7.2019
Welcome to an incredibly controversial topic in the land of front-end development! I’m sure that a majority of you reading this have encountered your fair share of #hotdrama surrounding how CSS should be handled within a JavaScript application.
I want to preface this post with a disclaimer: There...
A Little Reminder That Pseudo Elements are Children, Kinda.
8.7.2019
Here's a container with some child elements:
<div class="container">
<div>item</div>
<div>item</div>
<div>item</div>
</div>
If I do:
.container::before {
content: "x"
}
I'm essentially doing:
<div class="container">
...
Five Methods for Five-Star Ratings
5.7.2019
In the world of likes and social statistics, reviews are very important method for leaving feedback. Users often like to know the opinions of others before deciding on items to purchase themselves, or even articles to read, movies to see, or restaurants to dine.
Developers often struggle with with...
PSA: Linking to a Code of Conduct Template is Not the Same as Having a Code of Conduct
5.7.2019
Did you know we have a site that lists all upcoming conferences related to front-end web design and development? We do! If you're looking to go to one, check it out. If you're running one, feel free to submit yours.
Now that we're running this, I've got loads of Pull Requests for conferences...
The Twelfth Fourth
4.7.2019
CSS-Tricks is 12 years old! Firmly into that Early Adolescence stage, I'd say ;) As we do each year, let's reflect upon the past year. I'd better have something to say, right? Otherwise, John Prine would get mad at me.
How the hell can a person go to work in the morning
And come home in...
CSS-Tricks on Flywheel
4.7.2019
I first heard of Flywheel through their product Local, which is a native app for working on WordPress sites. If you ask around for what people use for that kind of work, you'll get all sorts of answers, but an awful lot of very strong recommendations for Local. I've become one of them!...
Menus with “Dynamic Hit Areas”
3.7.2019
Flyout menus! The second you need to implement a menu that uses a hover event to display more menu items, you're in tricky territory. For one, they should work with clicks and taps, too. Without that, you've broken the menu for anyone without a mouse. That doesn't mean you can't also use :hover....
Hey, let’s create a functional calendar app with the JAMstack
3.7.2019
Hey, let's create a functional calendar app with the JAMstack
I’ve always wondered how dynamic scheduling worked so I decided to do extensive research, learn new things, and write about the technical part of the journey. It’s only fair to warn you: everything I cover here is three weeks of research...
Haunted: Hooks for Web Components
3.7.2019
I was just chatting with Dave and he told me about Haunted. It's hooks, but for native web components! Pretty cool. I think the existence of stuff like this makes using web components more and more palatable — particularly in that totally-native no-build-step-needed-at-all kinda way.
I...
Graphical User Interfaces for Git
3.7.2019
Git is command-line-driven software, but that doesn't mean you have to use the command line to make it work. There are lots of options! Some of the deepest programmer nerds I know prefer to use GUIs for Git (Graphic
User Interface, or you know, software you can see things and click stuff), and some...
Toast
3.7.2019
One day, all the sudden, I started hearing jokes about toast. I had no idea what the context was. I assumed some friends just got started telling toast jokes, which isn't rare by any means. But it turns out it was a whole thing. It got me thinking, jeez, if I can't keep up with this stuff when it's...
Restricting a (pseudo) element to its parent’s border-box
2.7.2019
Have you ever wanted to ensure that nothing of a (pseudo) element gets displayed outside its parent's border-box? In case you're having trouble picturing what that looks like, let's say we wanted to get the following result with minimal markup and avoiding brittle CSS.
The desired result.
This...
Tips for rolling your own lazy loading
1.7.2019
You may have heard (or even issued the call) that “we can just use lazy loading!” when looking for a way to slim down a particularly heavy web page.
Lazy loading is a popular technique for gradually requesting images as they come into view, rather than all at once after the HTML of the page...
Making width and flexible items play nice together
1.7.2019
The short answer: flex-shrink and flex-basis are probably what you’re lookin’ for.
The long answer
Let’s say you want to align an image and some text next to each other with like this:
Now let's say you reach for flexbox to make it happen. Setting the parent element to display: flex; is a good...
The (Developer’s) Growth Model
29.6.2019
I really like the post "The Designer’s Growth Model" by Dennis Hambeukers. Dennis just invented this model, but it's based on some existing ideas and it all rings true for me. Let me try to summarize the five stages as he lays them out for designers.
Producers: You learn how to design. You learn...
The (Developer’s) Growth Model
29.6.2019
I really like the post "The Designer’s Growth Model" by Dennis Hambeukers. Dennis just invented this model, but it's based on some existing ideas and it all rings true for me. Let me try to summarize the five stages as he lays them out for designers.
Producers: You learn how to design. You learn...
Weekly Platform News: Event Timing, Google Earth for Web, undead session cookies
28.6.2019
In this week's news, Wikipedia helps identify three slow click handlers, Google Earth comes to the web, SVG properties in CSS get more support, and what to do in the event of zombie cookies.
The post Weekly Platform News: Event Timing, Google Earth for Web, undead session cookies appeared first...
Weekly Platform News: Event Timing, Google Earth for Web, undead session cookies
28.6.2019
In this week's news, Wikipedia helps identify three slow click handlers, Google Earth comes to the web, SVG properties in CSS get more support, and what to do in the event of zombie cookies.
The post Weekly Platform News: Event Timing, Google Earth for Web, undead session cookies appeared first...
Nownownow
28.6.2019
Matthias Ott, relaying an idea he heard from Derek Sivers:
Many personal websites, including this one here, have an “about” page. It’s a page that tells you something about the background of a person or about the services provided. But what this page often doesn’t answer – and neither do Twitter...
Which CSS IS AWESOME makes the most sense if you don’t know CSS well?
27.6.2019
Peter-Paul posted this question:
Which of the examples in the image do you consider correct?
If you know CSS well, don't reply, just retweet.
If you don't know CSS too well, please reply to the poll in the next tweet. pic.twitter.com/4bgnf9Wdkc
— ppk 🇪🇺 (@ppk) June...