Search

Nalezeno "LiNK": 1159

The Fastest Google Fonts


When you use font-display: swap;, which Google Fonts does when you use the default &display=swap part of the URL , you’re already saying, “I’m cool with FOUT,” which is another way of saying web text is displayed right away, and when the web font is ready...

A “new direction” in the struggle against rightward scrolling


You know those times you get a horizontal scrollbar when accidentally placing an element off the right edge of the browser window? It might be a menu that slides in or the like. Sometimes we to overflow-x: hidden; on the body to fix that, but that can sometimes wreck stuff like position:...

User agents


Jeremy beating the classic drum: For web development, start with HTML, then CSS, then JavaScript (and don’t move on to JavaScript too quickly—really get to grips with HTML and CSS first). And then… That’s assuming you want to be a good well-rounded web developer. But it might be that...

CSS fix for 100vh in mobile WebKit


A surprisingly common response when asking people about things they’d fix about anything in CSS, is to improve the handling of viewport units. One thing that comes up often is how they relate to scrollbars. For example, if an element is sized to 100vw and stretches edge-to-edge, that’s...

WTF is a Static API


Just like there is a movement to make more websites (and more of websites) from pre-rendered static files (Jamstack), so to might we consider moving content-based APIs to be static. Sean C Davis: A static API is simply a collection of flat JSON files that live on a content delivery...

Pseudo-elements in the Web Animations API


To use the Web Animations API (e.g. el.animate()) you need a reference to a DOM element to target. So, how do you use it on pseudo-elements, which don’t really offer a direct reference? Dan Wilson covers a (newish?) part of the API itself: const logo...

Why does writing matter in remote work?


Talk to anyone who has an active blog and I bet they’ll tell you it’s been valuable to them. Maybe it’s opened doors. Maybe it’s got them a job. Maybe it’s got them a conference invite. Maybe they just like the thrill of knowing people have read and responded to...

How I Put the Scroll Percentage in the Browser Title Bar


Some nice trickery from Knut Melvær. Ultimately the trick boils down to figuring out how far you’ve scrolled on the page and changing the title to show it, like: document.title = `${percent}% ${post.title}` Knut’s trick assumes React and installing an additional library. I’m sure...

min(), max(), and clamp() are CSS magic!


Nice video from Kevin Powell. Here are some notes, thoughts, and stuff I learned while watching it. Right when they came out, I was mostly obsessed with font-size usage, but they are just functions, so they can be used anywhere you’d use a number, like a length. Sometimes pretty basic usage...

Modern CSS Solutions for Old CSS Problems


This is a hell of a series by Stephanie Eckles. It’s a real pleasure watching CSS evolve and solve problems in clear and elegant ways. Just today I ran across this little jab at CSS in a StackOverflow answer from 2013. This particular jab was about CSS lacking a way to pause between...

Chromium lands Flexbox gap


I mentioned this the other day via Michelle Barker’s coverage, but here I’ll link to the official announcement. The main thing is that we’ll be getting gap with flexbox, which means: .flex-parent { display: flex; gap: 1rem; } .flex-child { flex: 1; } That’s excellent...

Exciting Things on the Horizon For CSS Layout


Michelle Barker notes that it’s been a heck of a week for us CSS layout nerds. Firefox has long had the best DevTools for CSS Grid, but Chrome is about to catch up and go one bit better by visualizing grid line numbers and names. Firefox supports gap for display: flex, which is great,...

Angular + Jamstack! (Free Webinar)


(This is a sponsored post.) It’s easy to think that working with Jamstack means working with some specific set of technologies. That’s how it’s traditionally been packaged for us. Think LAMP stack, where Linux, Apache, MySQL and PHP are explicit tools and languages. or MEAN...

Enable Gatsby Incremental Builds on Netlify


The concept of an “incremental build” is that, when using some kind of generator that builds all the files that make for a website, rather than rebuilding 100% of those files every single time, it only changes the files that need to be changed since the last build. Seems like...

The Hero Generator


Sarah: I’ve had to implement the same hero for several years now, so like a good lazy programmer, I figured I’d automate it. Direct Link to Article — Permalink… Read article “The Hero Generator” The post The Hero Generator appeared first on CSS-Tricks

Real-World Effectiveness of Brotli


Harry Roberts: The numbers so far show that the difference between no compression and Gzip are vast, whereas the difference between Gzip and Brotli are far more modest. This suggests that while the nothing to Gzip gains will be noticeable, the upgrade from Gzip to Brotli might perhaps...

Different Approaches to Responsive CSS Motion Path


As a follow-up to Jhey’s recent post on responsive motion paths, Michelle Barker notes that another approach could be to just transform: scale() the whole dang element. The trade-off there is that you’re scaling both the path and the element on the path at the same time; Jhey’s...

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