de en es fr nl pl pt sv zh

css

Honoring Mobile OS Text Size

Adrian Roselli

If your users scale the text size in Android or iDeviceOS, that doesn’t always affect the size of text on a web page. It’s a function of browser and authored code, as opposed to a standardized approach. That may be changing. Support The current state of affairs in the three rendering...

Today’s Readings

Aaron T. Grogg

Starting off with a little shameless self-promotion: I recently shared NoLoJS, an open-source design library of components aiming to reduce reliance on JS, in favor of just HTML and CSS, as much as possible. The idea is to create a collection of web patterns that have historically relied heavily...

TRMNL recipies

Eana Hufwe

A bundle of recipes I wrote for TRMNL, an e-ink dashboard display. Wikipedia Article of the Day A TRMNL plugin that fetches and displays the Wikipedia article of the day in multiple languages. Learn More Install Random Unicode A random Unicode codepoint on each refresh....

Rotated Background Patterns in CSS with SVG

Eana Hufwe

While working on the WordPress theme Tìtsyul Amip Twenty Twenty-Five, a need arose for a more flexible way to implement rotated background patterns in CSS. Existing methods often involve trade-offs, and this exploration led to a technique leveraging the power of SVG. Existing Approaches and...

How to start a Web Project with Accessibility in Mind?

Accessabilly

But you’re in the wrong skin And the skin that you’re in says Oh, let it begin And earth is the loneliest planet of all Morrissey, “Earth Is The Loneliest Planet” So you want to start a web project and accessibility is one of its core requirements? Here is an overview of stuff you might want to...

Indecisive Skip Links and their Targets – the Renaissance of the <hr> Element

Accessabilly

Do not forget They tried to turn you Into a public target Morrissey, “I am not a Dog on a Chain” Sometimes, it is easy to identify the position of skip links. Mostly when content blocks follow with a lot of interactive elements, or just a lot of content. But what about their target? Do you always...

Keep those PCF components inside the box

Greg Hurlman

You could be forgiven if you thought that the overall div container that the Power Apps Component Framework gives you would constrain your control to the outer boundary. You might also think that you'd automatically get the runtime height and width of your control when you asked for it.The bad...

Fastest Google Fonts | Notes

Kumar Abhishek

Direct Links: csswizardry.com/2020/05/the-fastest-google-fontscss-tricks.com/how-to-load-fonts-in-a-way-that-fights-fout-and-makes-lighthouse-happy Preconnect to Google Font server. Use preload to asynchronously load the font fast on supported browsers. In the link to the main font stylesheet:...

system-font-i18n-css

0xADADA

system-font-i18n-css provides twelve variations for the Sans-serif family of system font. This font stack provides more consistent character typesetting across multiple languages and all modern operating systems. system-font-i18n-css is optimized to select the best system font on a per-character...

Animating SVG with CSS

0xADADA

I finally got around to converting my avatar from a raster graphic to a vector format. I wanted to be able to animate the polygons using JavaScript and CSS. Another great advantage of a vector format is how the format lends itself to generate a PNG or JPG in any size. Massaging the SVG File Format...

Linting CSS with stylelint

Roger Johansson

I like to keep my CSS tidy and consistently formatted. One of the tools I use to help with that is stylelint. If anyone’s curious, this post explains how I configure it. You can run stylelint in multiple ways. I use it via the PostCSS plugin, but you can run it from the command line, from within...

Simple Way to Prevent Websites Jumping from Scrollbars

Bits, Bobs & Breakpoints — Aaron Holmes

Simple Way to Prevent Websites Jumping from Scrollbars# 1 April 2016 CSS A common occurance I see on websites, and a frequent question I see as well regards websites “jumping” when more content loads onto the page and a scrollbar becomes visible in the browser. The solution to this is remarkably...

Why I don’t use CSS preprocessors

Roger Johansson

Whenever I mention that I don’t use CSS preprocessors I tend to get strange looks from people who cannot imagine writing CSS without Sass. And so I have to defend my choice and explain why, over and over. Some people will understand, most won’t. Or they don’t want to. But here’s an attempt to...

Displaying code with Ace on Ghost

Bits, Bobs & Breakpoints — Aaron Holmes

Displaying code with Ace on Ghost# 28 November 2014 Ghost, Ace, Theme, JavaScript, CSS After getting Ghost set up, I was disappointed to see the lack of syntax highlighting in Casper’s codeblocks. Additionally, code posted on sites where I can’t copy, edit, or scroll around is a huge pet peeve of...

Cutting down on vendor prefixes

Roger Johansson

Most web developers currently use vendor prefixes in CSS to enable certain features in some browsers. That’s fine, but sometimes I see code examples and prefix-adding tools that go a bit overboard with the support and add every possible prefix that has ever been in use (and sometimes even ones...

Full-width justified vertically centered navbar

Roger Johansson

In a couple of recent projects I’ve faced designs where the main navigation bar gave me more trouble than usual. These are the prerequisites that make the problem tricky to solve: The navbar is full-width and the links have to fill up the entire width regardless of how many of them there are...

Responsive scrollable tables

Roger Johansson

Over six years ago I wrote a short post about preventing HTML tables from becoming too wide. The solutions I offered in that post involve using table-layout:fixed to lock down the width of tables. While that may work in some cases, it often will not be very pleasant to use. Since I wrote that...

Height in percent when parent has min-height and no height

Roger Johansson

When trying to force an element to always extend to the height of its parent I ran into some peculiar browser behaviour that I thought was worth mentioning. Here’s the situation: The parent element has a min-height specified (in pixels), but no height The child’s height is set to 100% I was...

How to proportionally scale images that have dimension attributes

Roger Johansson

Allowing images to scale along with their container is an important part of responsive web design (and was so even before the term “responsive web design” existed). It’s really quite easy – all you need to do is give the image a width (or max-width) in percent: img { max-width:100%; } This will...

Firefox and the magical text-overflow:ellipsis z-index

Roger Johansson

A while ago I received a strange bug report for a site I’d been working on. The report mentioned dots appearing on top of a dropdown menu when it was expanded. I had a look in Safari, could not see any dots, but then tried Firefox. And sure enough, there were sets of three dots in the dropdown...

Replacing images when printing

Roger Johansson

It isn’t all that uncommon that, after you’ve polished your print stylesheet to make a site look well on paper as well as on screen, you realise that the logo really doesn’t look its best. It may look blurry or pixelated on paper due to having a pixel density intended for screen viewing, of...

Best Practices for Writing CSS

0xADADA

Every selector you write is additional complexity that will need to be maintained. Can you generalize or abstract that selector so other components can use it? Write your CSS selectors to be as concise as possible Write your CSS selectors to be as performant as possible, efficient as possible and...