Syntax - Tasty Web Development Treats
Hosted by Scott Tolinski and Wes Bos
Written by a model from the transcript; not yet reviewed.
Wes Bos and Scott Tolinski walk through eight new and upcoming features in CSS, HTML, and JavaScript, discussing how these native capabilities reduce the need for external libraries and workarounds. The episode covers recent additions and intent-to-ship updates across major browser engines, focusing on practical styling controls, math helpers, and asynchronous programming improvements. Key additions include alpha transparency shorthands in CSS relative colors, a native progress function, and JavaScript promise resolution keyed by objects rather than array indices.
Hosts introduce the episode and preview the eight new CSS, HTML, and JavaScript APIs.
Explanation of the new Promise.allKeyed feature that allows awaiting an object of promises instead of an array.
Hosts discuss the proposed <camera> and <microphone> HTML elements for declaratively accessing media devices.
Review of the modern attr() function that can be used with any CSS property, not just content.
Introduction to the :nth-child and :nth-last-child functions that provide sibling index and count in CSS.
Explanation of the max-content sizing property that lets a container shrink to fit its content.
Discussion of new text-box-trim and text-box-edge properties for precise vertical alignment of text.
Hosts wrap up the episode, mention the demo page, and thank listeners.
CSS Alpha Relative Color Syntaxinsight
A new shorthand allows developers to make any color semi-transparent by adding a forward slash and percentage value, regardless of whether the base color is hex or HSL.
The Native CSS Progress Functioninsight
The progress function calculates where a value sits between two endpoints, even when those endpoints use completely different CSS units.
JavaScript Promise All Keyedinsight
A new native JavaScript feature allows developers to pass an object of promises and await them directly, returning resolved keys without relying on array index matching.
Modern CSS Attribute Functioninsight
The updated attribute function lets developers use custom attribute values directly in properties like background, width, and height, turning HTML attributes into CSS props.
Sibling Index and Count Functionsinsight
CSS sibling-index and sibling-count functions return the current index and total count of sibling elements without requiring JavaScript loops or extensive nth-child rules.
Precise Text Box Trimmingstrategy
The text-box-trim property removes excess whitespace above capital letters and below descenders, allowing for exact vertical centering in buttons and badges.
“CSS relative color, which is you be able to take a specific color and then return the R, the G, the B, and the A, or the H, the S, the L, and the A.”
“This will just do the math for you. This is nothing to do with the CSS or the HTML progress element, which I initially thought it was.”
“If you have three or four promises, like, say, for example, you want to fetch a podcast, you want to fetch your users, you want to fetch a bunch of posts, you want to do that concurrently, or most people will think you want to do that in parallel.”
“Now you could pass this stuff directly into your CSS. Basically, you could set a property on a div and have that act as like a prop and and access that value directly in your CSS.”
“If you have big capital A, a Y that goes down, then the height of that text, even if you don't use those letters, the height of that line or that text box is going to be huge.”
Scott and Wes run through eight new CSS, JS, and HTML features landing in browsers; including the relative alpha() color function, the progress() function for calculating values between units, Promise.allKeyed(), and native camera and microphone elements. They also get into an upgraded attr(), shrink-to-fit containers, and text-box-trim for finally killing that annoying extra space above your text. Show Notes 00:00 Welcome to Syntax! Wes’s Demo Site 00:22 CSS Alpha() Relative Color Function Google Groups 02:25 Brought to you by Sentry.io 02:48 CSS CSS Progress() Function: Calculate Values Between Units 05:09 Promise.allKeyed(): Object-Based Promise Resolution 06:55 Camera and Microphone HTML Elements 09:24 Advanced CSS Attr() Function: Props for CSS 11:25 CSS Sibling-Index() and Sibling-Count() Functions 13:56 CSS Shrink-to-Fit Container 15:36 CSS Text-Box-Trim and Text-Box-Edge Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott: X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads
3,344 words · 2 speakers
Speaker names marked are inferred from speaking time and the show’s known hosts — they are not voice-verified.
Page updated · transcript and summary are machine-generated