Search

Nalezeno "QR code": 1615

A Community-Driven Site with Eleventy: Building the Site


In the last article, we learned what goes into planning for a community-driven site. We saw just how many considerations are needed to start accepting user submissions, using what I learned from my experience building Style Stage as an example. Now that we’ve covered planning, let’s get to some...

Can you get valid CSS property values from the browser?


I had someone write in with this very legit question. Lea just blogged about how you can get valid CSS properties themselves from the browser. That’s like this. CodePen Embed Fallback That gives you, for example, the fact that cursor is a thing. But then how do you know what valid values...

CSS-Tricks Chronicle XXXVIII


Hey gang! I’ve been fortunate enough to be a guest in a variety of different here, so I thought it was time for another Chronicle post. You know, those special posts where I round up the random goings-on of things I do off of this site. I joined Ed & Tom over on A Question of Code. We...

Stacked Cards with Sticky Positioning and a Dash of Sass


The other day, I spotted this particularly lovely bit from Corey Ginnivan’s website where a collection of cards stack on top of one another as you scroll. I started wondering how much JavaScript this would involve and how you’d go about making it when I realized — ah! — this must be the work...

Practical Use Cases for JavaScript’s closest() Method


Have you ever had the problem of finding the parent of a DOM node in JavaScript, but aren’t sure how many levels you have to traverse up to get to it? Let’s look at this HTML for instance: <div data-id="123"<buttonClick me</button</div That’s pretty straightforward, right? Say...

zerodivs.com


Pretty neat little website from Joan Perals, inspired by stuff like Lynn’s A Single Div. With multiple hard-stop background-image gradients, you don’t need extra HTML elements to draw shapes — you can draw as many shapes as you want on a single element. There is even a stacking order...

More Control Over CSS Borders With background-image


You can make a typical CSS border dashed or dotted. For example: .box { border: 1px dashed black; border: 3px dotted red; } You don’t have all that much control over how big or long the dashes or gaps are. And you certainly can’t give the dashes slants, fading, or animation!...

What does 100% mean in CSS?


When using percentage values in CSS like this… .element { margin-top: 40%; } …what does that % value mean here? What is it a percentage of? There’ve been so many times when I’ll be using percentages and something weird happens. I typically shrug, change the value to something else...

font-weight: 300 considered harmful


Tomáš Janoušek: Many web pages these days set font-weight: 300 in their stylesheet. With DejaVu Sans as my preferred font, this results in very thin and light text that is hard to read, because for some reason the “DejaVu Sans ExtraLight” variant (weight 200) is being used...

Warp SVG Online


The warping is certainly the cool part here. Some fancy math literally transforms the path data to do the warping. But the UX detail work here is just as nice. Scrolling the page zooms in and out via a transform: scale() on the SVG wrapper (clever!). Likewise, holding the spacebar lets you...

The Cicada Principle, revisited with CSS variables


Lea Verou digging up the CSS trickery classic and applying it to clip the backgrounds of some code blocks: The main idea is simple: You write your main rule using CSS variables, and then use :nth-of-*() rules to set these variables to something different every N items. If you use enough...

SVG Title vs. HTML Title Attribute


You know the title attribute? I can do this: <div title="The Title"I'm a div with a `title` </div And now if I’m on a device with a mouse pointer and hover the cursor over that element, I get… Which, uh, I guess is something. I sometimes use it for things like putting...

Getting the Most Out of Variable Fonts on Google Fonts


I have spent the past several years working (alongside a bunch of super talented people) on a font family called Recursive Sans & Mono, and it just launched officially on Google Fonts! Wanna try it out super fast? Here’s the embed code to use the full Recursive variable font family from Google...

A Bit on Web Component Libraries


A run of Web Components news crossed my desk recently so I thought I’d group it up here. To my mind, one of the best use cases for Web Components is pattern libraries. Instead of doing, say, <ul class="nav nav-tabs"> like you would do in Bootstrap or <div class="tabs"> like...

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