Search
Weekly Platform News: CSS ::marker pseudo-element, pre-rendering web components, adding Webmention to your site
18.7.2019
In this week's roundup: datepickers are giving keyboard users headaches, a new web component compiler that helps fight FOUC, we finally get our hands on styling list item markers, and four steps to getting webmentions on your site.
The post Weekly Platform News: CSS ::marker pseudo-element...
Using GraphQL Playground with Gatsby
18.7.2019
I’m assuming most of you have already heard about Gatsby, and at least loosely know that it’s basically a static site generator for React sites. It generally runs like this:
Data Sources → Pull data from anywhere.
Build → Generate your website with React and GraphQL.
Deploy → Send the site to...
Get Peak WordPress Performance with Jetpack
18.7.2019
The irony of web performance is that the average page weight of a site continues to go up year after year, despite us being more aware of the problem and having more tools at our disposal to fight it than ever.
To paraphrase Seinfeld, "we know how to fight page weight issues; we just don't use...
Multi-Line Truncation with Pure CSS
17.7.2019
Truncating a single line of text if is fairly straightforward. Truncating multiple lines is a bit harder. Using just CSS (no JavaScript or server-side dancing) is nice for the simplicity. It's gotten a little easier lately since Firefox (since version 68) has started supporting the ultra-bizarre...
Improving Video Accessibility with WebVTT
17.7.2019
"The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect."
- Tim Berners-Lee
Accessibility is an important element of web development, and with the ever-growing prevalence of video content, the necessity for captioned content is growing...
Micro Frontends
17.7.2019
One random day not long ago, I started hearing joke after joke about "micro frontends" — sort of how I first learned about Toast. I didn't understand the source until asking around, which uncovered this article from Cam Jackson.
In this article we'll describe a recent trend of breaking...
A Peek at New Methods Coming to Promises
16.7.2019
Promises are one of the most celebrated features introduced to JavaScript. Having a native asynchronous artifact baked right into the language has opened up a new era, changing not only how we write code but also setting up the base for other freat APIs — like fetch!
Let's step back a moment...
Finally… A Post on Finally in Promises
16.7.2019
“When does finally fire in a JavaScript promise?” This is a question I was asked in a recent workshop and I thought I’d write up a little post to clear up any confusion.
The answer is, to quote Snape:
...always.
The basic structure is like this:
try {
// I’ll try to execute some code...
So, you think you’ve got project management nailed down
16.7.2019
(This is a sponsored post.)
Who needs a project manager? You're an organized person who can keep track of your own work, right?
Wrong.
Well, wrong if you're part of a team. The thing about being self-organized is that it's related to project management but not synonymous with it. Case in point:...
Managing Multiple Backgrounds with Custom Properties
15.7.2019
One cool thing about CSS custom properties is that they can be a part of a value. Let's say you're using multiple backgrounds to pull off a a design. Each background will have its own color, image, repeat, position, etc. It can be verbose!
You have four images:
body {
background-position:
...
Build a Chat App Using React Hooks in 100 Lines of Code
15.7.2019
We’ve looked at React Hooks before, around here at CSS-Tricks. I have an article that introduces them as well that illustrates how to use them to create components through functions. Both articles are good high-level overviews about the way they work, but they open up a lot of possibilities...
Position Sticky and Table Headers
13.7.2019
You can't position: sticky; a <thead>. Nor a <tr>. But you can sticky a <th>, which means you can make sticky headers inside a regular ol' <table>. This is tricky stuff, because if you didn't know this weird quirk, it would be hard to blame you. It makes way more...
Color Inputs: A Deep Dive into Cross-Browser Differences
12.7.2019
In this article, we'll be taking a look at the structure inside <input type='color'> elements, browser inconsistencies, why they look a certain way in a certain browser, and how to dig into it. Having a good understanding of this input allows us to evaluate whether a certain cross-browser...
Weekly Platform News: HTML Inspection in Search Console, Global Scope of Scripts, Babel env Adds defaults Query
11.7.2019
In this week's look around the world of web platform news, Google Search Console makes it easier to view crawled markup, we learn that custom properties aren't computing hogs, variables defined at the top-level in JavaScript are global to other page scripts, and Babel env now supports the defaults...
Protecting Vue Routes with Navigation Guards
11.7.2019
Authentication is a necessary part of every web application. It is a handy means by which we can personalize experiences and load content specific to a user — like a logged in state. It can also be used to evaluate permissions, and prevent otherwise private information from being accessed...
Frontend Masters: The New, Complete Intro to React Course… Now with Hooks!
11.7.2019
(This is a sponsored post.)
Much more than an intro, you’ll build a real-world app with the latest features in React including 🎣 hooks, effects, context, and portals.
We also have a complete React learning path for you to explore React even deeper!
Direct Link to Article —...
The Fight Against Layout Jank
11.7.2019
A web page isn't locked in stone just because it has rendered visually. Media assets, like images, can come in and cause the layout to shift based on their size, which typically isn't known in fluid layouts until they do render. Or fonts can load and reflow layout. Or XHRs can bring in more content...
Types or Tests: Why Not Both?
10.7.2019
Every now and then, a debate flares up about the value of typed JavaScript. "Just write more tests!" yell some opponents. "Replace unit tests with types!" scream others. Both are right in some ways, and wrong in others. Twitter affords little room for nuance. But in the space of this article we...
Introducing Netlify Analytics
10.7.2019
You work a while on a side project. You think it's pretty cool! You decide to release it into the world. And then… it goes well. Or it doesn’t go well. Wait, is that right? You forgot to add analytics — it just didn’t cross your mind at the time. Now you’re pretty curious how many people have...
Developing a robust font loading strategy for CSS-Tricks
10.7.2019
Zach Leatherman worked closely with Chris to figure out the font loading strategy for this very website you're reading. Zach walks us through the design in this write-up and shares techniques that can be applied to other projects.
Spoiler alert: Font loading is a complex and important part of...