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
Cascading Style Sheets (CSS) is the web’s core styling language. For web developers, It’s one of the quickest technologies to get started with, but one of the hardest to master. Follow Una Kravets and Adam Argyle, Developer Advocates from Google, who gleefully breakdown complex aspects of CSS into digestible episodes covering everything from accessibility to z-index.
CSS Viewport units have been around for the last few years, and by time, I see them being used more and more by developers. Their benefit lies in providing u...
Setting Height And Width On Images Is Important Again — Smashing Magazine
Thanks to some recent changes in browsers, it’s now well worth setting `width` and `height` attributes on your images to prevent layout shifts and improve the experience of your site visitors.
Adventures in CSS Semi-Transparency Land | CSS-Tricks
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
Responsive Grid Magazine Layout in Just 20 Lines of CSS | CSS-Tricks
I was recently working on a modern take of the blogroll. The idea was to offer readers a selection of latest posts from those blogs in a magazine-style
What Does A Foldable Web Actually Mean? — Smashing Magazine
Foldable devices have brought with them talk of a ‘foldable web,’ and the idea that long-standing web conventions may be on the verge of a serious shakeup. Is it all hype, or is it time to get flexible?
“Making Things Better: Redefining the Technical Possibilities of CSS” by Rachel Andrew—An Event Apart video
Over the last few years, rapid browser implementation of advances in CSS have given us the ability to do many of these previously impossible things. We can use our new powers to build the same designs faster, or we can start to ask ourselves what we might do if we were solving these problems afresh.
We are a community of users of CSS print, working together to gather use cases, help with specifications, and advocate for more and better implementations.
Understanding CSS Grid: Grid Template Areas — Smashing Magazine
In a new series, Rachel Andrew breaks down the CSS Grid Layout specification. This time, we take a look at how to use grid-template-areas to place items.
Whether you call them cards, block links, or some other thing, the construct of making an area of content clickable (tappable, Enter-key-able, voice-activatable, etc.) is not new. While hit area size is mostly a usability issue, marketers often want a larger click area around their calls to action (CTAs) to…
CSS Tutorial: Create Diagonal Layouts Like It's 2020
Layouts with diagonal sections are quite popular for several years now. You will probably not find it in the articles titled "Design trends for 2020". But I think it is here to stay. It is one tool designers can use to bring some dynamic to all the rectangular boxes with boring 90-degree angles.
The Evolution of Responsive Design by Rachel Andrew
We typically understand responsive design as being fluid grids, flexible images and media queries - these being the elements detailed in Ethan Marcotte’s original A List Apart article on responsive web design.