Mike Riethmuller: It is possible to have precise control over responsive typography. Using calc() and viewport units you can create fluid type that scales perfectly between specific pixel values, within a specific viewport range. The formula used is this one: @media (min-width: #{$min_width}px) and (max-width: #{$max_width}px) { font-size: calc(#{$min_font}px + (#{$max_font} – #{$min_font}) * ( …
Tag Archives: css
CSS Containment
Decorative CSS Text Underline
Decorative Text Underline uses a combination of box-shadow and text-shadow to form a modest underline that preserves the element color and weaves between text descenders. Neat, yet very intensive and only works with text that is rendered onto a fixed background color (no gradients or images!). I sure do hope we can get this natively …
Mediaqueryless Responsiveness
Slides of the – highly entertaining – talk @Vasilis gave at CSS Day 2016 in which he elaborated on a few techniques he experimented with in order to get responsive-like sites without using any media queries. Some neat tricks include: Calling it “active whitespace” instead of floats getting stacked up 😛 Setting a unit-ed value …
CSS for Software Engineers for CSS Developers
Modern Layouts: Getting Out Of Our Ruts
Video (filmed at An Event Apart) and slides from “Modern Layouts: Getting Out of Our Ruts” by Jen Simmons: In the early years of the web, there was a lot of variation and experimentation with where to put content on a web page. Then, it seems we all settled into a handful of patterns and …
universal.css
The only .css file you’ll ever need, following the most recent CSS methodologies where you define just about everything in separate classes. Usage is really easy: Take any CSS rule you want to apply, replace : by -, and dots by -dot-, and you get the name of the corresponding universal css classname. For instance, …
Flexbugs – Flexbox issues and cross-browser workarounds for them.
This repository is a community-curated list of flexbox issues and cross-browser workarounds for them. The goal is that if you’re building a website using flexbox and something isn’t working as you’d expect, you can find the solution here. Truth be told, most of the time “something is not as I’d expect” when using flexbox 😛 …
Continue reading “Flexbugs – Flexbox issues and cross-browser workarounds for them.”
Prevent overscroll/bounce in iOS MobileSafari and Chrome (CSS only)
UPDATE 2017.12: For non-Safari browsers (e.g. Chrome, Firefox) you can use overscroll-behavior to solve exactly this. Simply apply overscroll-behavior-y: none; on html, body and be done with it. html, body { overscroll-behavior-y: none; } Safari however does not support it … UPDATE 2021.06: The workaround below no longer seems to work in recent iOS/MobileSafari versions …
Continue reading “Prevent overscroll/bounce in iOS MobileSafari and Chrome (CSS only)”
A Complete Guide to CSS Grid Layout
Great cheat sheet / guide by Chris House, on Grid Layout — a CSS spec that has gotten me really excited ever since it has been announced (over two years ago): My intention with this guide is to present the Grid concepts as they exist in the very latest version of the specification. So I …