Math.random() is an API in JavaScript. It is a function that gives you a random number. The number returned will be between 0 (inclusive, as in, it’s possible for an actual 0 to be returned) and 1 (exclusive, as in, it’s not possible for an actual 1 to be returned). Math.random(); // returns a random number lower than 1 This is incredibly useful for gaming, animations, randomized data, generative art, random text generation, and more! It can be used for … Read article “Lots of Ways
A bunch of SVG icons (of popular things) all under 1KB. SVG is awesome for golfing. I was going to add a CodePen logo but there is already one in there at 375 Bytes. I’ve got one at 208 Bytes, based on a logo update David DeSandro did for us a couple years back. Direct Link to Article — Permalink… Read article “Super Tiny Icons”
The post Super Tiny Icons appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.
Rachel Andrew introducing the fact that masonry layout is going to be a thing in native CSS via CSS grid layout. The thing with masonry is that we can already do it for the most part, but there is just one thing that makes it hard: doing the vertical-staggering and having a left-to-right source order. So that’s what this new ability will solve in addition to it just being less hacky in general. You can already test a partial implementation … Read article “Native CSS Masonry L
I first blogged about responsive data tables in 2011. When responsive web design was first becoming a thing, there were little hurdles like data tables that had to be jumped. The nature of elements are that they have something a minimum width depending on the content they contain and that can easily exceed the width of a small screen device. This image I made then still covers the issue pretty well: Except… maybe they don’t equally suck. If that … Read article “Under-En
Some HTML elements come with preset designs, like the inconveniently small squares of elements, the limited-color bars of elements, and the “something about them bothers me” arrows of the elements. We can style them to match the modern aesthetics of our websites while making use of their functionalities. There are also many elements that rarely get used as both their default appearance and functionality are less needed in modern web designs. One such HTML element is … Read article R
We made one! It’s open source if you want to make it better or fix things. There are quite a few purpose-built fonts for writing code. The point of this site is to show you some of the nicest options so you can be aware of them and perhaps pick one out to try that suites your taste.
We used screenshots of the code to display just so we could show off some of the paid fonts without managing a … Read article “A Microsite Showcasing Coding Fonts”
The post A Microsite Show
Matthias Ott, comparing how painter Gerhard Richter paints (do stuff, step back, take a look) to what can be the website building process and what can wreck it:
[…] this reminds me of designing and building for the Web: The unpredictability, the peculiarities of the material, the improvisation, the bugs, the happy accidents. There is one crucial difference, though. By using static wireframes and static layouts, by separating design and development, we are often limiting our ability to hav
You might know a few ways to create charts with pure CSS. Some of them are covered here on CSS-Tricks, and many others can be found on CodePen, but I haven’t seen many examples of “area charts” (imagine a line chart with the bottom area filled in), particularly any in HTML and CSS alone. In this article, we’ll do just that, using a semantic and accessible HTML foundation. Let’s start with the HTML To simplify things, we will … Read article “How to Make an Area Chart With CSS&#
First, quickly: AWS Amplify has a new Admin UI. Amplify always had a CLI that helps you build projects by setting up stuff like auth, storage, and APIs. That’s super useful, but now, you can do those things with the new Admin UI. And more, like model your data (!!), right from a local UI. That’s great for people like… me (I like my GUIs). Now, slower. Let’s start with the idea of Jamstack. Static Hosting + Services, right? … Read article “Amplify, Amplified&