Recording intelligenceAI-generated brief · check the source for context

8 New CSS, JS and HTML Features You Should Know

18:37 recording · EN · 2 speakers

Watch the original

Executive Summary AI
  • Syntax Today opens with the hosts running through eight new CSS, HTML and JavaScript APIs that Wes built demos for, several of which neither host knew were coming.
  • The first is the CSS relative color alpha shorthand: pass any color plus a forward slash and a percentage to make it semi-transparent at runtime rather than at Sass build time, and it has been in Chrome since version 151 (July 27th, 2026), ships in Safari 27, and is in the Firefox nightly build.
  • Next is the CSS progress function, which tells you where a value sits between a start and an end value even when the units differ (two EMs against eight pixels and 100%, or 20 pixels against 400% width), returning a unitless number you still coerce with calc; it is everywhere except Firefox, where Gecko is intent to ship.
  • On the JavaScript side, promise.all keyed lets you await an object whose properties are promises instead of an array, so results come back keyed and destructurable rather than ordered by index.
  • The remaining CSS additions are the modernised attr function usable on any property as CSS props, sibling index and sibling count for evenly spacing unknown numbers of items, max content sizing shrink to fit for parents wrapping fit-content children, and text box trim and text box edge, which Wes used as text box trim cap alphabetic on the Mad CSS site and which has been in Chrome since February,

Brief overview

Eight new CSS, HTML and JavaScript APIs are shipping across browsers, and Firefox is finally catching up.

  1. Firefox is the last gate on most of theseRelative color alpha, progress, attr and sibling index all wait on Gecko, and Wes tracks readiness through the intent posts on the Google groups.
  2. Runtime beats build time for color mathSass and Stylus could already make a color semi-opaque, but Wes wants it done in the browser at runtime, not compiled ahead.
  3. Declarative camera and microphone elements convince nobodyBoth hosts end up sceptical: you still need JavaScript for the stream and the events, so the value only appears if it pairs with something like the Invokers API.

Questions this recording answers

10 questions, each answered where it is said
What does the new CSS relative color alpha shorthand do?

Relative color lets you pull the r, g, b and a, or the h, s, l and a, out of a color. The new short form is simpler: give background a color, whether hex, HSL or whatever, then a forward slash and the percentage you want, and the color becomes semi-transparent at runtime.

Which browsers support the relative color alpha short form?

It is in everything. Safari has it in Technology Preview and it arrives in Safari 27, Firefox has it in the current nightly build, and Chrome has had it since version 151, as of July 27th, 2026. Because relative color is already implemented, this is a low-lift syntax add.

What does the CSS progress function calculate?

It does the calc work of asking where your value sits between a starting and an ending value. You pass where you are plus the two bounds, and the units need not match: where is 2em between 8 pixels and 100%, or 150 extrapolated between zero and a thousand.

Does the progress function return a value with units?

It gives you a unitless value, so if you want a percent, em or px you still have to coerce it with calc. It also has nothing to do with the CSS or HTML progress element; it simply answers how far you are between two values.

What problem does promise.allKeyed solve?

promise.all and promise.allSettled only take arrays, so the order results come back in matters and you loop over them using the index of the value. With allKeyed you make an object whose properties are promises, fetch user and fetch posts, await it, and get the object back with resolved keys to destructure.

What changed in the CSS attribute (attr) function?

attr has been in the web forever, but you could only really use it with content. The modern implementation lets you use the value in a real way with anything: background, width, height. That turns attributes into props for CSS, so a button with data-dash-size small, medium or large is readable directly in your styles.

What do the CSS sibling index and sibling count functions give you?

They give the current index of an item and the count of how many siblings there are. Previously you counted with JavaScript or wrote nth-child rules for every possible case. The example is a 360 degree circular navigation: with four items the rotation is zero, 25, 50, 75, and five items changes every value.

What do text box trim and text box edge fix?

Line height one accounts for the very highest capitals and the very lowest descenders, so the text box is huge even when no letter ascends or descends and your button is not vertically centred. On the Mad CSS site, text-box-trim cap alphabetic trimmed it to the letters so equal top and bottom padding matched exactly.

Are the new camera and microphone HTML elements actually useful?

They declaratively request access where you would normally call navigator.mediaDevices.getUserMedia, take the stream and put it into a video element or a media recorder. But you still have to listen for the access events and write regular JavaScript, so the benefit is unclear; it is only in prototyping stage and may pair with the Invokers API.

What does shrink to fit container solve?

Set width fit-content on a paragraph and it is only as wide as its text, but the element wrapping it is still 100% wide and you cannot fit-content that too, which drives you toward floats. The new max content sizing shrink to fit suctions the parent down to the size of the fit-content child.

Key Quote

“Welcome to Syntax Today. We've got eight amazing new CSS, HTML, and JavaScript APIs that you need to know about.”

— 8 New CSS, JS and HTML Features You Should Know, at 0:01▶ watch at 0:01
Key Quote

“Well, Sass has done it build time.”

— Wes, 8 New CSS, JS and HTML Features You Should Know, at 1:36▶ watch at 1:36
Key Quote

“It's been in Chrome since version 151.”

— Wes, 8 New CSS, JS and HTML Features You Should Know, at 1:56▶ watch at 1:56
Key Quote

“I don't want a library for this.”

— Wes, 8 New CSS, JS and HTML Features You Should Know, at 6:54▶ watch at 6:54
Key Quote

“I think you've talked me out of it.”

— 8 New CSS, JS and HTML Features You Should Know, at 9:21▶ watch at 9:21
Key Quote

“Now, this function has been around in the web for a billion years.”

— Wes, 8 New CSS, JS and HTML Features You Should Know, at 9:31▶ watch at 9:31

Cite this

“8 New CSS, JS and HTML Features You Should Know.” https://www.youtube.com/watch?v=Ssm0vJtJr2U. Transcript summary by WhipScribe, https://whipscribe.com/transcript-pages/8-new-css-js-and-html-features-you-should-know.html.

Report this page
What is wrong with this page?