Preventing layout shifts with CSS Grid, clamp(), custom list markers and fixed haders and jump links with scroll-margin. Issue #276 ⢠Tue, Nov. 24, 2020 ⢠[View in the browser]( ð¨ [Smashing Newsletter]( Dear Friends, The subject of the newsletter today is CSS â very much my favorite subject! We have plenty of CSS-related material in our [Guide to CSS Layout]( and a good number of useful articles that weâve published in the past (e.g. â[How To Learn CSS]( would be a good place to start). But in case youâre looking to dive in even more into the world of CSS, thereâs still time to book one of the final remaining tickets for our workshop with Andy Bell on â[Building A Design System With CSS](. Heâll be showing you how to create a resilient and scalable design system using CUBE CSS, and so much more! Also, we have just announced that this December 17, we are organizing another community-based [Smashing Meets]( event! This time, itâll be a nice and cozy âHappy Holidaysâ edition to celebrate the holiday season of this interesting year with a few hours of Smashing fun! There will be three talks and some fun side events, too. Tickets are only 10 USD, and our Smashing Members get in for free. [Smashing Meets Happy Holidays Edition]( I hope that our American readers have a good Thanksgiving, and while it may be a bit different compared to the previous years, hopefully youâll still manage to celebrate and have some time to relax. Stay safe,
Rachel Andrew (@rachelandrew) --------------------------------------------------------------- Table of Contents 1. [Preventing Layout Shifts With CSS Grid](#a1)
2. [Fluid Typography With clamp()](#a2)
3. [New Front-End & UX Workshops](#a3)
4. [A Clever Solution For Autogrowing Textareas](#a4)
5. [Custom List Markers](#a5)
6. [Fixing Headers And Jump Links](#a6)
7. [New On Smashing Job Board](#a7)
8. [Our Current Most Popular Articles](#a8)
--------------------------------------------------------------- #1. Preventing Layout Shifts With CSS Grid Itâs no news that CSS Grid is a fantastic tool to build complex layouts. But did you know that it can help you prevent layout shifts, too? When Hubert Sablonnière discovered a layout shift problem with a toggling state on a UI component he worked on, he came up with a solution: the â[Anti Layout Shift Grid Stacking Technique](. [Prevent layout shifts with CSS grid stacks]( Compared to solving the layout shift with absolute positioning, Hubertâs Grid-based technique supports complex situations that require more than two panels. Another benefit: You donât need to assume which panel should guide the size of the whole component. If you want to dive in deeper, Hubert wrote up everything you need to know to prevent both vertical and horizontal shifts in a practical [blog post](. (cm) --------------------------------------------------------------- #2. Fluid Typography With clamp() When it comes to fluid scaling, CSS has some exciting new features: clamp(), min(), and max(). They cap and scale values as the browser grows and shrinks. min() and max() return the respective minimum and maximum values at any given time while clamp lets you you pass in both a minimum and maximum plus a preferred size for the browser to use. [Clamp]( As Trys Mudford points out, clamp() comes in particularly handy when you want broadly fluid typography without being 100% specific about the relationship between the varying sizes. In his [in-depth article]( about the new feature, he shares valuable hands-on tips for using clamp() effectively. (cm) --------------------------------------------------------------- #3. New Front-End & UX Workshops Weâve been running online workshops since April this year, and itâs always an [incredible experience]( with wonderful attendees from all over the world coming together to learn something together. Thatâs [Smashing Workshops]( live 2.5h-sessions with practical examples, video recordings and a friendly Q&A. [Smashing Online Workshops](
Live and interactive: [2.5h-sessions]( spanning across days or weeks. Weâve just announced our [new front-end & UX workshops]( on front-end in 2021, forms, SVG animation, CSS and HTML email. There are still some early-birds left, with a lilâ friendly discount, so [take a look]( and perhaps join us as well. --------------------------------------------------------------- #4. A Clever Solution For Autogrowing Textareas Thereâs no native solution for an autogrowing