Search

Nalezeno "LINE": 603

How to Make an Area Chart With CSS


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


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 });


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


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


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


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


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


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...

GIFS and prefers-reduced-motion


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...

Gray Burst


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...

The CSS Custom Property Toggle Trick


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...

EY, Samsung SDS & Naver-Line Consortium Bids to Test South Korean CBDC


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


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...

Nahoru
Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tímto souhlasíte. Další informace