Search
Responsible, Conditional Loading
25.12.2020
Over on the Polyplane blog (there’s no byline but presumably it’s Kilian Valkhof), there is a great article, Creating websites with prefers-reduced-data, about the prefers-reduced-data media query. No browser support yet, but eventually you can use it in CSS to make choices that reduce...
Converting and Optimizing Images From the Command Line
21.12.2020
Images take up to 50% of the total size of an average web page. And if images are not optimized, users end up downloading extra bytes. And if they’re downloading extra bytes, the site not only takes that much more time to load, but users are using more data, both of which can be resolved, at least...
Late to Logical
7.12.2020
2020 brought another wave of logical property features to major browsers and I’ve thoroughly enjoyed my investment into logical, rather than physical, web styling. I feel like I’ve learned a new way to speak about the box model that results in less written code with more global coverage.
p {
...
How to Make an Area Chart With CSS
2.12.2020
You might know a few ways to create charts with pure CSS. Some of them are covered here on CSS-Tricks, and many others can be found on CodePen, but I haven’t seen many examples of “area charts” (imagine a line chart with the bottom area filled in), particularly any in HTML and CSS alone. In this...
Lots of Ways to Use Math.random() in JavaScript
30.11.2020
Math.random() is an API in JavaScript. It is a function that gives you a random number. The number returned will be between 0 (inclusive, as in, it’s possible for an actual 0 to be returned) and 1 (exclusive, as in, it’s not possible for an actual 1 to be returned).
Math.random(); // returns...
console.log({ myVariable });
19.11.2020
I think this might be my most popular tweet of all time, but I’m not sure how to verify that these days. I’ll restate this neat little trick here because blogging is cool and fun.
I used to do this a lot while debugging JavaScript:
console.log("myVariable: ", myVariable);
But now I...
Firefox 83
19.11.2020
There’s a small line in the changelog that is is big news for CSS:
We’ve added support for CSS Conic Gradients (bug 1632351) and (bug 1175958).
🎉🎉🎉
Conic gradients are circular, just like their radial counterpart, but place color stops...
Chat App Line Offers Crypto Cashback-type Rewards for e-Pay Spending
18.11.2020
Japan-based chat app operator Line has upped the stakes in its crypto business again by combining its Line Point Club rewards program with its link (LN) cryptoasset – allowing earners to trade in their points for link tokens.
The new program, which launched this week, will make use of the firm’s...
Libraries for SVG Drawing Animations
11.11.2020
In 2013, Jake Archibald introduced this cool trick of animating an SVG path to look like it’s drawing itself. It’s 2020 now, and the trick is still popular. I’ve seen it on a lot of websites I’ve visited recently. I, too, feature an animated SVG loader on my website using one of the libraries I’ll...
Understanding flex-grow, flex-shrink, and flex-basis
11.11.2020
When you apply a CSS property to an element, there’s lots of things going on under the hood. For example, let’s say we have some HTML like this:
<div class="parent"<div class="child"Child</div<div class="child"Child</div<div class="child"Child</div</div
And...
ARIA in CSS
11.11.2020
Jeremey reacting to Sara’s tweet, about using [aria-*] selectors instead of classes when the styling you are applying is directly related to the ARIA state.
… this is my preferred way of hooking up CSS and JavaScript interactions. Here’s [an] old CodePen where you can see...
Systém „Lůžka on-line“ může sledovat obsazenost nemocnic. Stojí za ním robotici z ČVUT
6.11.2020
Co nejlepší využití dat je často skloňováno jako jeden z hlavních způsobů, jak se nám může podařit porazit současnou druhou vlnu koronaviru. Stát sice začal určité informace zveřejňovat, jejich využitelnost ale není nejlepší. A tak stejně jako na jaře přišli na pomoc univerzitní vědci. Připravili
GIFS and prefers-reduced-motion
3.11.2020
The <picture> element has a trick it can do where it shows different image formats in different situations. If all you are interested in is formats for the sake of performance, maybe you’d do:
<picture<source srcset="img/waterfall.avif" type="image/avif"<source...
Naše supermasivní černá díra v Mléčné dráze je introvertní a líné monstrum
3.11.2020
Supermasivní černá díra Mléčné dráhy zrovna nehýří aktivitou • Potvrzují to i výsledky nového výzkumu • Podle nich je tato černá díra natolik líná, že ani pořádně nerotuje
Gray Burst
3.11.2020
I made this neat little gray burst thing. It’s nothing particularly special, especially compared to the amazing creativity on CodePen, but I figured I could document some of the things happening in it for learning reasons.
CodePen Embed Fallback
It’s SVG
SVG has <line x1 y1...
MicroStrategy's bottom line gets beefier on Bitcoin moves: Bad crypto news of the week
31.10.2020
Check out this week’s Bad Crypto podcast
The CSS Custom Property Toggle Trick
29.10.2020
Back in July 2020, I got an email from James0x57 (I always try to refer to people by their name, but I think I get the sense they prefer to go by screen name) that says:
The entire world of branching conditional logic and bulk feature toggling for custom CSS properties is possible and only exists...
Anheuser-Busch considers integrating blockchain further into its beer production line
26.10.2020
The company is testing a new blockchain pilot that would give customers the power to track their beer’s barley by the bottle
EY, Samsung SDS & Naver-Line Consortium Bids to Test South Korean CBDC
22.10.2020
There has been mixed news for the central Bank of Korea (BOK) as it prepares to launch its first pilot for the digital won.
The bank is still yet to make an official decision on whether it will actually launch the central bank digital currency (CBDC) or not, but recently claimed that it would...
Smarter Ways to Generate a Deep Nested HTML Structure
21.10.2020
Let’s say we want to have the following HTML structure:
<div class='boo'<div class='boo'<div class='boo'<div class='boo'<div class='boo'</div</div</div</div</div
That’s real a pain to write manually. And the reason why this post was born was being...