Search

Nalezeno "Link": 1159

Lazy Loaded Prefill Embeds


Lemme sum this up: CodePen has Embedded Pens. Build a Pen on CodePen, embed it on any other site. We also offer Prefill Embeds, which remove that first step. With Prefill Embeds, the Pen doesn’t need to exist on CodePen at all. You pass in the code and settings you want to appear in...

We need more inclusive web performance metrics


Scott Jehl argues that performance metrics such as First Contentful Paint and Largest Contentful Paint don’t really capture the full picture of everyone’s experience with websites: These metrics are often touted as measures of usability or meaning, but they are not necessarily meaningful...

A little bit of plain Javascript can do a lot


Julia Evans: I decided to implement almost all of the UI by just adding & removing CSS classes, and using CSS transitions if I want to animate a transition. An awful lot of the JavaScript on sites (that aren’t otherwise entirely constructed from JavaScript) is click the thing...

How to delete all node_modules directories from your computer


Nice tip from Chris Ferdinandi: My node_modules directories contained 50mb of stuff on the small side, and over 200mb of files in some cases. Over a few dozen projects, that really adds up! Two dozen projects with 200 MB worth of node_modules? That’s nearly 5 GB of space for...

Improving Chromium’s browser compatibility in 2020


This is exactly what I love to hear from any browser vendor: When it comes to browser compatibility, there are still too many missing features and edge-case bugs. But it doesn’t have to be this way. Things can and will get better, if browser vendors can understand what is causing the most...

Bootstrap 5


It’s always notable when the world biggest CSS framework goes up a major version (it’s in alpha now). It has dropped jQuery and IE, started using some CSS custom properties, gone fully customized with form elements, started to embrace utility classes, and includes a massive icon...

USA.css


Lots of fun with gradients from Bennet Feely: stars, stripes, banners, bursts… I love being able to use nice patterns with either no image requests at all, or very little SVG. And important reminder: Bennet does all sorts of cool stuff. I’ve probably used Clippy about a million times....

Refreshing Sidebar for 2020


The new design for Sidebar is lovely. I like how it goes even deeper with the sticky elements than the last design. But even more notably, Sacha Greif has been posting five links per day to Sidebar since 2012. That’s a remarkable achievement. Direct Link to Article — Permalink…...

How-to guide for creating edge-to-edge color bars that work with a grid


Hard-stop gradients are one of my favorite CSS tricks. Here, Marcel Moreau combines that idea with CSS grid to solve an issue that’s otherwise a pain in the butt. Say you have like a 300px right sidebar on a desktop layout with a unique background color. Easy enough. But then say you want...

Global and Component Style Settings with CSS Variables


The title of this Sara Soueidan article speaks to me. I’m a big fan of the idea that some CSS is best applied globally, and some CSS is best applied scoped to a component. I’m less interested in how that is done and more interested in just seeing that conceptual approach used in some...

Styling Layout Wrappers In CSS


Two things that strike me often about the web are how many ways there are to go about the same thing and how many considerations go into even the most seemingly simple things. Working with wrapper elements is definitely on both those lists. Wrappers (or containers or whatever) are so common...

Quick Tips for High Contrast Mode


Sarah Higley has some CSS tricks up her sleeve for dealing with High Contrast Mode on Windows, which I learned is referred to as WHCM. Here’s the first trick: […] if the default CSS outline property doesn’t give you the visual effect you want [in WHCM] for focus states...

The Return of the 90s Web


One of my forever-lessons here on CSS-Tricks is that having your own website and blogging on it is a good idea. It’s probably one of the best decisions I’ve ever made, as it’s been a direct source of fun, career development and, eventually, income. I always chuckle at little...

Line-Animated Hamburger Menu


This kind of SVG + CSS animation trickery is catnip to me. Mikael Ainalem shares how to draw a hamburger icon (the “three lines” thing you’re well familiar with), but then animate it in a way that is surprising and fun by controlling the SVG properties in CSS. CodePen Embed...

Grid for layout, flexbox for components


When should we reach for CSS grid and when should we use flexbox? Rachel Andrew wrote about this very conundrum way back in 2016: Flexbox is essentially for laying out items in a single dimension – in a row OR a column. Grid is for layout of items in two dimensions – rows AND columns. Ahmad...

The Mad Magazine Fold-In Effect in CSS


This was always my favorite thing in Mad magazine. One page (the inside of the back cover, I think) was covered in a zany illustration. You folded that page in thirds, covering up the middle-third of that image, and a new image would form because the illustration was designed to perfectly line...

WebP Image Support Coming to iOS 14


Apple announced a ton of new updates at yesterday’s WWDC20 keynote address, from new hardware to updated applications. There’s lots to gawk at and enough device-envy to go around. But there’s one little line in the Safari 14 Beta release notes that caught my eye: Added WebP image...

Rough Notation


This is a neat little library. It uses SVG to insert hand-drawn looking annotations to elements (probably text), like underlines and box highlights (there are 6 design options, all configurable). Super clever. Here’s a little demo: CodePen Embed Fallback Aside from it just being cool,...

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