Search
Wide Gamut Color in CSS with Display-P3
31.3.2020
Here’s something I’d never heard of before: Display-P3 support in CSS Color Module Level 4 spec. This is a new color profile supported by certain displays and it introduces a much wider range of colors that we can choose from.
Right now the syntax looks something like this in CSS:
header...
How They Fit Together: Transform, Translate, Rotate, Scale, and Offset
30.3.2020
Firefox 72 was first out of the gate with "independent transforms." That is, instead of having to combine transforms together, like:
.el {
transform: rotate(10deg) scale(0.95) translate(10px, 10px);
}
...we can do:
.el {
rotate: 10deg;
scale: 0.95;
translate: 10px 10px;
}
That's extremely...
Studujte on-line! Desítky fotografických kurzů jsou nyní zdarma
28.3.2020
Back From the Crypt: MakerDAO Toes the Line Between Life and Death
27.3.2020
DeFi barely recovers from a serious blow: “It was only a matter of time before the shockwaves from the growing financial crisis shook the very foundations of MakerDAO”
Did You Know the Ordered List Element Has Start and Reversed Attributes?
24.3.2020
I sure didn't! Tomek Sułkowsi shows how we can reverse the numbering of ordered lists with a simple HTML attribute:
<ol reversed<liApple</li<liBanana</li<liPear</li</ol
CodePen Embed Fallback
And the start attribute can be added to begin the list at a number other...
Indicating Scroll Position on a Page With CSS
24.3.2020
Scrolling is something we all know and do on the web to the extent that it’s an expectation or perhaps even a habit, like brushing our teeth. That’s probably why we don’t put too much thought into designing the scrolling experience — it’s a well-known basic function. In fact, the popular “there...
CSS :nth-of-class selector
23.3.2020
That's not a thing.
But it kinda is!
Bram covers how frustrating .bar:nth-child(2) is. It's not "select the second element of class .bar." It's "select the second element if it also has the class .bar." The good news? There is a real selector that does the former:
:nth-child(2 of .bar) { }
Safari...
CSS2JS
20.3.2020
To add inline styles on an element in JSX, you have to do it in this object syntax, like:
<div style={{
fontSize: 16,
marginBottom: "1rem"
}}Content
</div
That might look a little weird to us folks who are so used to the CSS syntax, where it is font-size (not fontSize), margin-bottom...
What Does `playsinline` Mean in Web Video?
18.3.2020
I got myself confused about this the other day, went around searching for an answer and came up empty on finding something clear. The answer actually is quite clear and I feel a little silly for not knowing it.
With it in place, like this:
<video src="..." controls playsinline</video
Mobile...
Ideas for Distorted Link Effects on Menus
18.3.2020
Some examples of how to use decorative distortion effects on big typography menu links.
Ideas for Distorted Link Effects on Menus was written by Mary Lou and published on Codrops
A Complete Guide to calc() in CSS
17.3.2020
CSS has a special calc() function for doing basic math. Here's an example:
.main-content {
/* Subtract 80px from 100vh */
height: calc(100vh - 80px);
}
In this guide, let's cover just about everything there is to know about this very useful function.
calc() is for values
The only place you...
Build a Node.js Tool to Record and Compare Google Lighthouse Reports
16.3.2020
In this tutorial, I’ll show you step by step how to create a simple tool in Node.js to run Google Lighthouse audits via the command line, save the reports they generate in JSON format and then compare them so web performance can be monitored as the website grows and develops.
I’m hopeful this...
How to Make a Line Chart With CSS
11.3.2020
Line,  bar, and pie charts are the bread and butter of dashboards and are the basic components of any data visualization toolkit. Sure, you can use SVG or a JavaScript chart library like Chart.js or a complex tool like D3 to create those charts, but what if you don't want to load yet another...
Sass !default and themeable design systems
11.3.2020
This is a great blog post from Brad Frost where he walks us through an interesting example. Let’s say we’re making a theme and we have some Sass like this:
.c-text-input {
background-color: $form-background-color;
padding: 10px
}
If the $form-background-color variable isn’t defined then...
Block Links Are a Pain (and Maybe Just a Bad Idea)
10.3.2020
As we noted in our complete guide, you can put an <a href=""> link around whatever chunks of HTML you like. Let's call that a "block link." Like you are wanting to link up an entire "Card" of content because it makes a big clickable target.
<a href="/article/"<!-- display: block;...
South Korea Passes Bill to Regulate Cryptocurrency in Line With FATF Standards
7.3.2020
South Korea’s National Assembly finally passed a bill that provides a framework for the regulation of cryptocurrencies and exchanges. Crypto service providers will be required to use the real-name verification system and comply with reporting requirements in line with the global...
What to Use Instead of Number Inputs
6.3.2020
You might reach for <input type="number> when you're, you know, trying to collect a number in a form. But it's got all sorts of issues. For one, sometimes what you want kinda looks like a number, but isn't one (like how a credit card number has spaces), because it's really just a string...
Currying in CSS
6.3.2020
Funny timing on this I was just looking at the website for Utopia (which is a responsive type project which I hate to admit I don't fully understand) and I came across some CSS they show off that looked like this:
:root {
--fluid-max-negative: (1 / var(--fluid-max-ratio)...
Distorted Link Effects with SVG Filters
4.3.2020
A couple of ideas for decorative link distortion effects using SVG filters on lines, circles and squares.
Distorted Link Effects with SVG Filters was written by Mary Lou and published on Codrops
Considerations for Creating a Card Component
2.3.2020
Here's a Card component in React:
const Card = props ={
return(
<div className="card"<h2{props.title}</h2<p{props.content}</p</div)
}
It might be pretty useful! If you end up using this thing hundreds of times, now you have the ability to refactor a little bit of HTML...