Search

Nalezeno "css-tricks": 2942

Considerations When Choosing Fonts for a Multilingual Website


As a front-end developer working for clients all over the world, I've always struggled to deal with multilingual websites — especially cases where both right-to-left (RTL) and left-to-right (LTR) are used. That said, I’ve learned a few things along the...

Make Yourself a Little API With Netlify Functions


Here's an example of a nice little use case for cloud functions. Glitch has this great package of friendly words. Say you wanted to randomly generate "happy-elephant" or "walking-tree", and you need to do that on your website in JavaScript. Well, this package is pretty big (~200 KB), necessarily...

Negative Margins


PPK digs into the subject, which he found woefully undercovered in web tech documentation. Our entry doesn't mention them at all, which I'll aim to fix. Agree on this situation: This is by far the most common use case for negative margins. You give a container a padding so that its contents have...

I Pressed ⌘B. You Wouldn’t Believe What Happened Next


This talk by Marcin Wichary is — beyond both enthusiastic and outstanding — all about the complexity of UI design, typography, and the lengths his team at Figma has gone to make sure that doing something as simple as selecting a font from a dropdown does what you expect it to. I’d recommend this...

Adventures in CSS Semi-Transparency Land


Recently, I was asked to make some tweaks to a landing page and, among the things I found in the code, there were two semitransparent overlays — both with the same RGB values for the background-color — on top of an image. Something like this: <img src='myImage.jpg'/> <div...

Use a:visited in your CSS stylesheet


Evert Pot: Unfortunately, when setting a new color (e.g. a { color: #44F }) the ‘purple visited link’ feature also gets disabled. I think this is a shame, as there’s so many instances where you’re going through a list of links and want to see what you’ve seen before. The 2 examples I ran into...

Geoff’s Redesign Posts


I love it when people redesign "in the open" and write about it. I'd just like to shout out to our own Geoff who has been doing this for 3 months now. He started in late December last year. He's been sharing stuff like his dev tooling choices, considering performance, considering accessibility...

Google Fonts + Variable Fonts


I see Google Fonts rolled out a new design (Tweet). Compared to the last big redesign, this feels much more iterative. I can barely tell the difference really, except it's blue instead of red and this one pretty rad checkbox: Show only variable fonts. An option to only show variable fonts is...

What to Use Instead of Number Inputs


You might reach for <input type="number> when you're, you know, trying to collect a number in a form. But it's got all sorts of issues. For one, sometimes what you want kinda looks like a number, but isn't one (like how a credit card number has spaces), because it's really just a string...

Currying in CSS


Funny timing on this I was just looking at the website for Utopia (which is a responsive type project which I hate to admit I don't fully understand) and I came across some CSS they show off that looked like this: :root { --fluid-max-negative: (1 / var(--fluid-max-ratio)...

Creating a Modal Image Gallery With Bootstrap Components


Have you ever clicked on an image on a webpage that opens up a larger version of the image with navigation to view other photos? Some folks call it a pop-up. Others call it a lightbox. Bootstrap calls it a modal. I mention Bootstrap because I want to use it to make the same sort of thing. So, let’s...

The 3 Laws of Serverless


Burke Holland thinks that to "build applications without thinking about servers" is a pretty good way to describe serverless, but... Nobody really thinks about servers when they are writing their code. I mean, I doubt any developer has ever thrown up their hands and said “Whoa, whoa, whoa. Wait...

Animating CSS Width and Height Without the Squish Effect


The first rule of animating on the web: don't animate width and height. It forces the browser to recalculate a bunch of stuff and it's slow (or "expensive" as they say). If you can get away with it, animating any transform property is faster (and "cheaper"). Butttt, transform can be tricky. Check...

Consistent Backends and UX: Why Should You Care?


More than ever, new products aim to make an impact on a global scale, and user experience is rapidly becoming the determining factor for whether they are successful or not. The post Consistent Backends and UX: Why Should You Care? appeared first on CSS-Tricks

The Slideout Footer


A fascinating new site called The Markup just launched. Tagline: Big Tech Is Watching You. We’re Watching Big Tech. Great work from Upstatement. The content looks amazing, but of course, around here we're always interested in the design and tech as well. There is loads to adore, from the clean...

Automated Selenium Testing with Jest and LambdaTest


You know what the best thing is about building and running automated browser tests is? It means that the site you're doing it on really matters. It means you're trying to take care of that site by making sure it doesn't break, and it's worth the time to put guards in place against that breakages....

JavaScript Libraries Are Almost Never Updated Once Installed


Some commentary from Zack Bloom on the Cloudflare Blog, looking at requests to CDNJS for versions of jQuery. What we don’t see is a decline in our old versions which come close to the volume of growth of new versions when they’re released. In fact the release of 3.4.1, as popular as it quickly...

What React Does (and Doesn’t Do)


With a name as big as React, it's bound to cause some Stream-Crossing Confusion, as I like to call it. How do you center a <div> in React? Dave Ceddia: React cares exactly zero about styling. Think of it as generating the barebones HTML. React will put elements on the page, but everything...

How We Created a Static Site That Generates Tartan Patterns in SVG


Tartan is a patterned cloth that’s typically associated with Scotland, particularly their fashionable kilts. On tartanify.com, we gathered over 5,000 tartan patterns (as SVG and PNG files), taking care to filter out any that have explicit usage restrictions. The idea was cooked up by Sylvain...

How I think about solving problems


Nicholas C. Zakas: Eventually, I settled on a list of questions I would ask myself for each problem as it arose. I found that asking these questions, in order, helped me make the best decision possible: 1) Is this really a problem?2) Does the problem need to be solved?3) Does the problem need...

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