Search

Nalezeno "QR code": 1615

Mixing Colors in Pure CSS


Red + Blue = Purple… right? Is there some way to express that in CSS? Well, not easily. There is a proposal draft for a color-mix function and some degree of interest from Chrome, but it doesn’t seem right around the corner. It would be nice to have native CSS color mixing, as it would give...

SVGBOX


I’ve been saying for years that a pretty good icon system is just dropping in icons with inline <svg> where you need them. This is simple to do, offers full design control, has (generally) good performance, and means you aren’t smurfing around with caching and browser support...

How to Work With WordPress Block Patterns


Just a little post I wrote up over at The Events Calendar blog. The idea is that a set of blocks can be grouped together in WordPress, then registered in a register_block_pattern() function that makes the group available to use as a “block pattern” in any page or post. Block patterns...

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

The Cleanest Trick for Autogrowing Textareas


Earlier this year I wrote a bit about autogrowing textareas and inputs. The idea was to make a <textarea> more like a <div> so it expands in height as much as it needs to in order to contain the current value. It’s almost weird there isn’t a simple native solution...

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

Netlify Background Functions


As quickly as I can: AWS Lambda is great: it allows you to run server-side code without really running a server. This is what “serverless” largely means. Netlify Functions run on AWS Lambda and make them way easier to use. For example, you just chuck some scripts into a folder they...

JavaScript Operator Lookup


Okay, this is extremely neat: Josh Comeau made this great site called Operator Lookup that explains how JavaScript operators work. There are some code examples to explain what they do as well, which is pretty handy. My favorite bit of UI design here are the tags at the bottom of the search...

Quick LocalStorage Usage in Vue


localStorage can be an incredibly useful tool in creating experiences for applications, extensions, documentation, and a variety of use cases. I’ve personally used it in each! In cases where you’re storing something small for the user that doesn’t need to be kept permanently...

How to Animate the Details Element Using WAAPI


Animating accordions in JavaScript has been one of the most asked animations on websites. Fun fact: jQuery’s slideDown() function was already available in the first version in 2011. In this article, we will see how you can animate the native <details> element using the Web Animations...

How to Write Loops with Preprocessors


Loops are one of those features that you don’t need every day. But when you do, it’s awfully nice that preprocessors can do it because native HTML and CSS cannot. Sass (SCSS) for Loop CodePen Embed Fallback while Loop CodePen Embed Fallback each Loop CodePen Embed Fallback Less for...

This page is a truly naked, brutalist html quine.


Here’s a fun page coming from secretGeek.net. You don’t normally think “fun” with brutalist minimalism but the CSS trickery that makes it work on this page is certainly that. The HTML is literally displayed on the page as tags. So, in a sense, the HTML is both the page...

Additive Animations in CSS


Daniel C. Wilson explains how with CSS @keyframe animations, when multiple of them are applied to an element, they do both work. But if any properties are repeated, only the last one works. They override each other. I’ve seen this limitation overcome by applying keyframes to nested elements...

Websites We Like: Whimsical


Whimsical is an app that lets you create flowcharts, wireframes, and mind maps but it was only earlier today that I spotted just how great the website is — especially the product pages. Check out this page where they describe how to use the Mind Maps feature where you can use the product right...

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

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