Search
Collective #563
7.11.2019
Game Off 2019 * Pure CSS Lace * The Svelte Handbook * GraphQL Crash Course * React Query
Collective #563 was written by Pedro Botelho and published on Codrops
Weekly Platform News: Tracking via Web Storage, First Input Delay, Navigating by Headings
4.10.2019
In this week's roundup, Safari takes on cross-site tracking, the delay between load and user interaction is greater on mobile, and a new survey says headings are a popular way for screen readers to navigate a webpage.
Let's get into the news.
Safari’s tracking prevention limits web storage
Some...
Meeting GraphQL at a Cocktail Mixer
26.9.2019
GraphQL and REST are two specifications used when building APIs for websites to use. REST defines a series of unique identifiers (URLs) that applications use to request and send data. GraphQL defines a query language that allows client applications to specify precisely the data they need from...
Multiplayer Tic Tac Toe with GraphQL
23.8.2019
GraphQL is a query language for APIs that is very empowering for front-end developers. As the GraphQL site explains it, you describe your data, ask for what you want, and get predictable results.
If you haven’t worked with it before, GraphQL might be a little confusing to grok at first glance....
Weekly Platform News: Preventing Image Loads with the Picture Element, the Web We Want, Svg Styles Are Not Scoped
1.8.2019
In this week's week roundup of browser news, a trick for loading images conditionally using the picture element, your chance to tell bowser vendors about the web you want, and the styles applied to inline SVG elements are, well, not scoped only to that SVG.
Let's turn to...
How much specificity do @rules have, like @keyframes and @media?
31.7.2019
I got this question the other day. My first thought is: weird question! Specificity is about selectors, and at-rules are not selectors, so... irrelevant?
To prove that, we can use the same selector inside and outside of an at-rule and see if it seems to affect specificity.
body {
background:...
CSS prefers-reduced-motion Media Query
30.7.2019
When I started in the web development industry, media queries were limited — screen and print were the two media queries I was most often using. More than a decade later, media queries have advanced to various screen units, feature checking, and even color scheme preference. I’ve been...
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...
Reduced Motion Picture Technique, Take Two
21.6.2019
Did you see that neat technique for using the <picture> element with <source media=""> to serve an animated image (or not) based on a prefers-reduced-motion media query?
After we shared that in our newsletter, we got an interesting reply from Michael Gale:
What about folks who love...
Game of Thrones Quiz Game with React and GraphQL: Set up GraphQL Query For the Quiz Questions
17.6.2019
Now we’ll create a component to render the data in the 8base backend. This component will handle the fetching of data using GraphQL queries and will render the fetched data accordingly. To get star
Reducing motion with the picture element
31.5.2019
Here’s a bonafide CSS/HTML trick from Brad Frost and Dave Rupert where they use the <picture> element to switch out a GIF file with an image if the user has reduced motion enabled. This is how Brad goes about implementing that:
<picture>
<!-- This image will be loaded if...
Revisiting prefers-reduced-motion, the reduced motion media query
30.4.2019
Two years ago, I wrote about prefers-reduced-motion, a media query introduced into Safari 10.1 to help people with vestibular and seizure disorders use the web. The article provided some background about the media query, why it was needed, and how to work with it to avoid creating...
People Digging into Grid Sizing and Layout Possibilities
15.3.2019
Jen Simmons has been coining the term intrinsic design, referring to a new era in web layout where the sizing of content has gone beyond fluid columns and media query breakpoints and into, I dunno, something a bit more exotic. For example, columns that are sized more by content and guidelines than...
How @supports Works
18.2.2019
CSS has a neat feature that allows us to test if the browser supports a particular property or property:value combination before applying a block of styles — like how a @media query matches when, say, the width of the browser window is narrower than some specified size and then the CSS within...
Where Do You Nest Your Sass Breakpoints?
11.2.2019
I love nesting my @media query breakpoints. It's perhaps the most important feature of Sass to me. Maybe I pick a method and do it like this:
.element {
display: grid;
grid-template-columns: 100px 1fr;
@include breakpoint(baby-bear) {
display: block;
}
}
That's straightforward enough....
prefers-color-scheme: CSS Media Query
28.1.2019
One device and app feature I’ve come to appreciate is the ability to change between light and dark modes. If you’ve ever done late night coding or reading, you know how amazing a dark theme can be for preventing eye strain and the headaches that result. macOS recently implemented...
Putting the Flexbox Albatross to Real Use
24.1.2019
If you hadn't seen it, Heydon posted a rather clever flexbox layout pattern that, in a sense, mimics what you could do with a container query by forcing an element to stack at a certain container width. I was particularly interested, as I was fighting a little layout situation at the time I...
WDRL — Edition 246: Custom Elements News, React lazy Method, The `prefers-color-scheme` Media Query And Human Customer Support
26.10.2018
Hey,
The web is fascinating. Just when you think there’s not much news happening right now you’re proved wrong. This week brings massive news for how we can work with Custom Elements given the very good fresh support in Firefox (along with Chrome which has support since a while already) and some...
Fast, Good, Local Site Search with Jetpack
12.7.2018
If you have, say, 20 posts/pages on your WordPress site, the search functionality that is baked right into your self-hosted WordPress site will probably do a great job. Search is a pretty cool feature to ship with WordPress, truth be told. But as a site grows, you'll find limits. How it works...
JSON Schema Validation and Expressive Query Syntax in MongoDB 3.6
10.5.2018
One of MongoDB’s key strengths has always been developer empowerment: by relying on a flexible schema architecture, MongoDB makes it easier and faster for applications to move through the developme