Search

Nalezeno "snippets": 43

Moving Rainbow Underlines


I absolutely love the design of the Sandwich site. Among many beautiful features are these headlines with rainbow underlines that move as you scroll. It's not scroll-jacking — it's just a minor design feature that uses scroll position to enact a little movement. To draw the rainbows...

Adam Argyle’s 2020 CSS Predictions


I think Adam's first prediction is his boldest, even beyond his Hail Mary prediction. CSS grid is awesome and gap is perhaps one of its best qualities, but gap superseding spacing things out in other ways (e.g. margin) is a bold prediction indeed, especially with Firefox being the only browser...

Using Custom Properties to Wrangle Variations in Keyframe Animations


Have you ever wondered how to customize CSS animations keyframes without using any preprocessor feature, like mixins? I keep reaching for preprocessors for this reason, but it would so nice to drop yet one more dependency and go with vanilla CSS. Well, I found a way to account for variations within...

Moving Text on a Curved Path


There was a fun article in The New York Times the other day describing the fancy way Elizabeth Warren and her staff let people take a selfie with Warren. But... the pictures aren't actually selfies because they are taken by someone else. The article has his hilarious line of text that wiggles by...

Multi-Line Truncation with Pure CSS


Truncating a single line of text if is fairly straightforward. Truncating multiple lines is a bit harder. Using just CSS (no JavaScript or server-side dancing) is nice for the simplicity. It's gotten a little easier lately since Firefox (since version 68) has started supporting the ultra-bizarre...

Introducing Netlify Analytics


You work a while on a side project. You think it's pretty cool! You decide to release it into the world. And then… it goes well. Or it doesn’t go well. Wait, is that right? You forgot to add analytics — it just didn’t cross your mind at the time. Now you’re pretty curious how many people have...

Smooth Scrolling for Screencasts


Let's say you wanted to scroll a web page from top to bottom programmatically. For example, you're recording a screencast and want a nice full-page scroll. You probably can't scroll it yourself because it'll be all uneven and jerky. Native JavaScript can do smooth scrolling. Here's a tiny snippet...

Downsides of Smooth Scrolling


Smooth scrolling has gotten a lot easier. If you want it all the time on your page, and you are happy letting the browser deal with the duration for you, it's a single line of CSS: html { scroll-behavior: smooth; } I tried this on version 17 of this site, and it was the second most-hated thing...

CSS Triangles, Multiple Ways


I like Adam Laki's Quick Tip: CSS Triangles because it covers that ubiquitous fact about front-end techniques: there are always many ways to do the same thing. In this case, drawing a triangle can be done: with border and a collapsed element with clip-path: polygon() with transform: rotate()...

CSS Variables + calc() + rgb() = Enforcing High Contrast Colors


As you may know, the recent updates and additions to CSS are extremely powerful. From Flexbox to Grid, and — what we’re concerned about here — Custom Properties (aka CSS variables), all of which make robust and dynamic layouts and interfaces easier than ever while opening up many other...

IE10-Compatible Grid Auto-Placement with Flexbox


If you work on web applications that support older browsers, and have lusted after CSS Grid from the sidelines like I have, I have some good news: I've discovered a clever CSS-only way to use grid auto-placement in IE10+! Now, it's not actually CSS Grid, but without looking at the code itself,...

Learn Flexbox on an Example Helpful and Enlightening Code Snippets


Flexbox is a box module system that does not need any introduction, especially for those who uses CSS on a daily basis. It is a real lifesaver when it... The post Learn Flexbox on an Example Helpful and Enlightening Code Snippets appeared first on Onextrapixel

Fantastic Code Snippets for Trying Popular Gooey Effect


The gooey effect is one of those features that is able to separate the interface from the mass of projects with crude boxy aesthetics and standard solutions. Though of... The post Fantastic Code Snippets for Trying Popular Gooey Effect appeared first on Onextrapixel

Google Fonts and font-display


The font-display descriptor in @font-face blocks is really great. It goes a long way, all by itself, for improving the perceived performance of web font loading. Loading web fonts is tricky stuff and having a tool like this that works as well as it does is a big deal for the web. It's such a...

A CSS Venn Diagram


This is pretty wild: Adrian Roselli has made a series of rather complex Venn diagrams using nothing but CSS. With a combination of the Firefox dev inspector, plus a mixture of CSS Grid and the shape-outside property, it’s possible to do this and without a ton of hacks, too. I also think it’s super...

Write React Faster w/ Simple React Snippets


I'm a big fan of speeding up every part of your development. If you shave off seconds here and there multiple times a day, you'll save a ton of time over the course of a year. This involves

HTML/CSS Code Snippets of Illustrated 404 Pages


How many times have you stumbled upon 404 Page? Hundred, thousand, a million times? All in all, we are humans who might be smarter than a decade ago and... The post HTML/CSS Code Snippets of Illustrated 404 Pages appeared first on Onextrapixel

How to Add Custom Code Snippets to Your WordPress Site


If you want to extend your WordPress site with custom functionalities you frequently need to add custom code snippets to your codebase. In fact, the web is full of... The post How to Add Custom Code Snippets to Your WordPress Site appeared first on Onextrapixel

CSS Grid in IE: Debunking Common IE Grid Misconceptions


This is the first in a three-part series all about how to use CSS grid in a way that will work not only in modern browsers but also in Internet Explorer (IE). Imagine writing CSS grid code without having to write a fallback layout! Many of us think that this is some far off future that is many...

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