Search
Using CSS to Set Text Inside a Circle
14.4.2020
You want to set some text inside the shape of a circle with HTML and CSS? That’s crazy talk, right?
Not really! Thanks to shape-outside and some pure CSS trickery it is possible to do exactly that.
However, this can be a fiddly layout option. We have to take lots of different things into...
Maintaining Performance
27.3.2020
Real talk from Dave:
I, Dave Rupert, a person who cares about web performance, a person who reads web performance blogs, a person who spends lots of hours trying to keep up on best practices, a person who co-hosts a weekly podcast about making websites and speak with web performance professionals…...
Emojis as Favicons
24.3.2020
Lea Verou had a dang genius idea to use an emoji as a favicon. The idea only recently possible as browsers have started supporting SVG for favicons. Chuck an emoji inside an SVG <text element and use that as the favicon.
Now that all modern browsers support SVG favicons, here's how...
CSS2JS
20.3.2020
To add inline styles on an element in JSX, you have to do it in this object syntax, like:
<div style={{
fontSize: 16,
marginBottom: "1rem"
}}Content
</div
That might look a little weird to us folks who are so used to the CSS syntax, where it is font-size (not fontSize), margin-bottom...
A Complete Guide to calc() in CSS
17.3.2020
CSS has a special calc() function for doing basic math. Here's an example:
.main-content {
/* Subtract 80px from 100vh */
height: calc(100vh - 80px);
}
In this guide, let's cover just about everything there is to know about this very useful function.
calc() is for values
The only place you...
Considerations When Choosing Fonts for a Multilingual Website
10.3.2020
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...
I Pressed ⌘B. You Wouldn’t Believe What Happened Next
9.3.2020
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...
Just Dropping Some Type Links
3.3.2020
I've had a bunch of tabs open that just so happen to all be related to typography, so I figured I'd give myself the mental release of closing them by blogging them. How's that for a blog post format for ya: whatever random tabs you've had open for far too long.
Times New Roman is popular on...
Select an Element with a Non-Empty Attribute
5.2.2020
Short answer:
[data-foo]:not([data-foo=""] {
Longer answer (same conclusion, just an explanation on why we might need this):
Say you have an element that you style with a special data-attribute:
<div data-highlight="product"</div
You want to target that element and do special things when...
How Do You Do max-font-size in CSS?
30.1.2020
CSS doesn't have max-font-size, so if we need something that does something along those lines, we have to get tricky.
Why would you need it at all? Well, font-size itself can be set in dynamic ways. For example, font-size: 10vw;. That's using "viewport units" to size the type, which will...
Resizing Values in Steps in CSS
30.1.2020
There actually is a steps() function in CSS, but it's only used for animation. You can't, for example, tell an element it's allowed to grow in height but only in steps of 10px. Maybe someday? I dunno. There would have to be some pretty clear use cases that something like background-repeat: space...
How We Tagged Google Fonts and Created goofonts.com
16.1.2020
GooFonts is a side project signed by a developer-wife and a designer-husband, both of them big fans of typography. We’ve been tagging Google Fonts and built a website that makes searching through and finding the right font easier.
GooFonts uses WordPress in the back end...
Is it better to use ems/rems than px for font-size?
10.1.2020
The answer used to be absolutely yes because, if you used px units, you prevented the text from being resized by the user at all.
But browser zoom is the default method for making everything bigger (including text) these days and it works great even if you use px.
But... Kathleen McMahon really...
Futuristic and Industrial: The Best Futuristic Fonts
8.1.2020
What does it take to create a design with a futuristic vibe? I believe each of you has its pack of tricks under your sleeves and most importantly, a...
The post Futuristic and Industrial: The Best Futuristic Fonts appeared first on Onextrapixel
Is “is” Useful?
3.1.2020
God I'm funny.
Anytime we have fairly repetitive selectors that have a common parent, it's probably a place we can use the :is() pseudo-selector.
Holger Bartel demonstrates like this:
section section h1, section article h1, section aside h1, section nav h1,
article section h1, article article...
Simplified Fluid Typography
29.11.2019
Fluid typography is the idea that font-size (and perhaps other attributes of type, like line-height) change depending on the screen size (or perhaps container queries if we had them).
The core trickery comes from viewport units. You can literally set type in viewport units (e.g. font-size: 4vw)...
The Power (and Fun) of Scope with CSS Custom Properties
27.11.2019
You’re probably already at least a little familiar with CSS variables. If not, here’s a two-second overview: they are really called custom properties, you set them in declaration blocks like --size: 1em and use them as values like font-size: var(--size);, they differ from preprocessor variables...
Teaching CSS
19.11.2019
I've been using CSS as a web developer since CSS became something we could actually use. My first websites were built using <font> tags and <table>s for layout. I remember arguments about whether this whole CSS thing was a good idea at all. I was quickly convinced, mostly due to...
The Teletype Text Element Lives On… at Least on This Site
11.10.2019
It was this: <tt>
I say "was" because it's deprecated. It may still "work" (like everybody's favorite <marquee> in some browsers), but it could stop working anytime, they say. The whole purpose of it was to display text in a monospace font, like the way Teletype machines used...
Create Text in Three.js with Three-bmfont-text
10.10.2019
A short tutorial on how to create animated text in Three.js with three-bmfont-text and give it a nice look using shaders.
Create Text in Three.js with Three-bmfont-text was written by Mario Carrillo and published on Codrops