Newly available
Loading…
Newly available
Loading…
Newly available
HTML, CSS, and JS features that became Baseline newly available in April
22 features · 7 years
The contrast-color() CSS function picks a color that has guaranteed contrast against a specified foreground or background color.
The Math.sumPrecise() static method returns the sum of an iterable of numbers. It avoids the precision loss of intermediate partial sums, as found using reduce() or a loop to add together an array of values.
The Atomics.pause() static method gives a hint to the CPU that the code calling the method is in a short-duration wait for shared memory, known as spinning or a spinlock.
Float16Array is a typed array of 16-bit floating point numbers.
Module import … with { type: "json" } statements load JSON data. Also known as JSON module scripts.
The align-content property vertically aligns content in block layouts, like it does in flex or grid layouts.
The Intl.Segmenter API creates a locale-aware text splitter that can separate a string into meaningful graphemes, words, or sentences.
The writing-mode CSS property orients form elements (such as radio buttons, progress bars, or select menus) vertically when the writing mode is vertical-lr or vertical-rl. The direction CSS property sets whether inputs flow from top to bottom or bottom to top.
The inert HTML attribute marks an element and its descendants as non-interactive. Inert elements don't get focus or fire click events.
The hwb() CSS function picks colors using hue, whiteness, and blackness channels.
The ::file-selector-button CSS pseudo-element selects the button of a <input type="file"> element.
The <input type="date"> and <input type="time"> HTML elements show date and time pickers.
The gap CSS property in a flexbox layout sets the size of the space between items.
The Intl.DisplayNames API provides localized names of language, region, script, and currency codes.
The Intl.ListFormat API creates a locale-aware formatter that turns iterable objects into localized strings.
The quotes CSS property sets the quotation marks inserted via the content CSS property or <q> element.
The WeakRef and FinalizationRegistry objects hold references to garbage-collectable objects without creating strong references that prevent their garbage collection.
The async and await keywords allow you to use the asynchronous, promise-based behavior of a function without using promise chains.
Custom properties are CSS properties prefixed with -- that set values you can reuse with the var() function. For example, you can set a --key-color property to reuse as border-color: var(--key-color). Also known as CSS variables.
The font-feature-settings CSS property sets low-level OpenType feature tags for a font. When possible, use font-variant instead.
The padStart() and padEnd() methods of strings return a string lengthened to a minimum number of characters by adding characters to the start or end of the string.
The -webkit-text-stroke-width and -webkit-text-stroke-color CSS properties set the thickness and color of text outlines. The -webkit-text-fill-color sets the color within text character outlines. Both default to the text color.