Newly available
Loading…
Newly available
Loading…
Newly available
HTML, CSS, and JS features that became Baseline newly available in January
64 features · 7 years
The :active-view-transition CSS pseudo-class matches the root element when a view transition is active. The :active-view-transition-type() CSS pseudo-class matches only when the active view transition was started with the specified type.
The navigator.serviceWorker.register() method accepts { type: "module" } to load scripts that use import and export. Also known as ECMAScript modules or ESM in service workers.
The rcap CSS length unit is a font-relative length equal to the value of the cap unit on the root element. Cap-height is approximately equal to the height of a capital Latin letter.
The rch CSS length unit is a font-relative length equal to the value of the ch unit on the root element. ch length is based on the width of the zero (0) character.
The rex CSS length unit is a font-relative length that is equal to the x-height of the root element.
The ric CSS length unit, or root international character, is a font-relative length equal to the width of CJK character relative to the root element.
The Promise.try() static method returns a promise that takes a callback of any kind (returns or throws, synchronously or asynchronously) and wraps its result in a Promise.
The popover HTML attribute creates an overlay to display content on top of other page content. Popovers can be shown declaratively using HTML, or using the showPopover() method.
The Array.fromAsync() static method copies items from an async iterable object to make a new array.
The font-synthesis CSS shorthand property disables all font synthesis except the given kinds. To disable a specific kind of font synthesis, instead use the longhand properties such as font-synthesis-style and font-synthesis-weight.
The :is() CSS functional pseudo-class takes a selector list as its argument, and matches any element that can be selected by one of the selectors in that list.
The :not() functional pseudo-class matches elements that do not match the selectors in its argument.
The :where() CSS functional pseudo-class takes a selector list as its argument, and matches any element that can be selected by one of the selectors in that list. It is functionally equivalent to the selectors in the list, but doesn't affect the CSS rule specificity.
The ::placeholder CSS pseudo-element selects help text in <input> and <textarea> elements when no value is set.
The :default CSS pseudo-class matches the default element in a group of related form controls, such as checkboxes and radio buttons with the checked attribute.
The :focus-within CSS pseudo-class matches an element if the element or any of its children are focused.
The :indeterminate CSS pseudo-class selects any form element whose state is indeterminate, such as checkboxes that have been set to an indeterminate state with JavaScript, or radio buttons which are members of a group in which all radio buttons are unchecked.
The :placeholder-shown CSS pseudo-element selects <input> and <textarea> elements when no value is set and the element's placeholder attribute is not empty. Not to be confused with ::placeholder, which selects the placeholder text itself.
The :scope CSS pseudo-class matches the scoping root, for instance the element that querySelector() is called on, or the root of a DOM subtree specified with @scope.
The <bdi> element isolates text that may have a different text direction from its surrounding text. This prevents the browser's bidirectional text algorithm from affecting or being affected by the direction of the surrounding text.
The <details> element is a disclosure widget which can be expanded to reveal additional content. When closed, only the nested <summary> element is visible.
The <embed> element represents an external resource such as a PDF or SVG document. It was historically used for plugins such as Shockwave Flash.
The <slot> HTML element is a placeholder inside a web component where consumers of the component can insert their own markup.
The all CSS property is a shorthand for all CSS properties, except for direction and unicode-bidi. It accepts only the keywords for explicit defaulting (such as initial and inherit), since they are the only values supported on all CSS properties.
The flat() and flatMap() methods for arrays creates a new array such that each nested array item is concatenated into it.
Async generator functions (async function*) create iterators that return multiple promises, one after another, on-demand.
Asynchronous iterator objects, such as those returned by promises or generator functions, are iterable with the for await .. of loop.
Autonomous custom elements are HTML elements with a hyphenated tag name (like <example-element>) that have behaviors you define.
The background-blend-mode CSS property blends an element's background image and background color using blend modes like multiply, difference, or color.
The caret-color CSS property sets the color of the text insertion pointer in a text input.
The i identifier in a CSS attribute selector matches attribute values case-insensitively in document languages like XML where attribute values are case-sensitive.
COLRv0 is a font format that supports multi-color glyphs. COLRv0 supports only solid colors.
The CSS.escape() static method escapes a string so that it can be used in a valid CSS selector.
The CSS.supports() static method returns whether the browser supports a CSS declaration (given by two arguments, a property and value) or an @supports at-rule condition string.
The destructuring assignment syntax is a JavaScript expression that unpacks values from arrays, or properties from objects, into distinct variables.
The display: flow-root CSS declaration sets an element as the root element of a new flow layout for its children, preventing margin collapse with sibling elements.
The dominant-baseline CSS property sets the specific baseline used to align an elements's text and inline-level contents.
The font-display CSS descriptor sets whether to show a substitute font or nothing while a font face loads. The property manages what's known as a flash of unstyled text or flash of invisible text.
The font-kerning CSS property sets whether kerning data from a font is used to adjust the space between letters.
The font-stretch CSS property selects a font face from a font family based on width, either by a keyword such as condensed or a percentage.
The font-variant-caps CSS property sets whether text should be displayed in small caps, petite caps, or with capital letters designed for titles.
The font-variant-east-asian CSS property controls glyph substitution and sizing in East Asian text.
The font-variant-ligatures CSS property sets how characters can be visually combined for readability or stylistic reasons.
The font-variant-numeric CSS property sets how numeric characters are displayed. For example, you can align columns of numbers or use zeroes that have a slash.
The globalThis property accesses the global this value (and hence the global object itself) across environments.
The :host CSS pseudo-class selects the containing element of the shadow tree in which it is used. The :host() CSS pseudo-class selects the that element only if it matches the provided selector.
The hsl() and hsla() CSS functions pick colors using hue, saturation, lightness, and alpha (transparency) channels.
The isolation CSS property creates a new stacking context, which impacts z-index ordering and blend modes.
The unicode-bidi and direction CSS properties override the Unicode layout algorithm. They are intended for Document Type Definition (DTD) designers. For HTML documents, you should use the dir global HTML attribute and <bdo> HTML element instead.
The :link CSS pseudo-class matches unvisited links, :visited matches visited links, and :any-link matches both.
The min-content and max-content CSS keywords represent the smallest and largest intrinsic sizes of an element.
The mix-blend-mode CSS property blends an element's content with its background or parent elements using blend modes like multiply, difference, or color.
Omit the binding parameter of a catch clause when you don't need information about the exception in a try ... catch statement.
The prefers-color-scheme CSS media query sets styles based on the requested color scheme, light or dark.
The prefers-reduced-motion CSS media query sets styles based on whether the user prefers to minimize the amount of non-essential animations on the device, such as scrolling, panning, zooming, and strobing.
The rgb(), rgba(), and hexadecimal (as in #004488ff) notations pick colors using red, green, blue, and alpha (transparency) channels.
The safe-area-inset- CSS environment variables represent a rectangle that cannot cut off content within a non-rectangular screen. For example, top:\ env(safe-area-inset-top); positions the top of an element below the notch on an iPhone.
The spread (...) syntax allows an iterable, such as an array or string, to be expanded in places where zero or more arguments (for function calls) or elements (for array literals) are expected.
Stable array sort() function
The matchAll() method of strings matches a string against a regular expression and returns an iterator of all results, including capturing groups.
The trimStart() and trimEnd() methods of strings return a new string with whitespace removed from the beginning or end of the string.
Template literals are literals delimited with backtick (`) characters, allowing for multi-line strings, string interpolation with embedded expressions, and special constructs called tagged templates.
The will-change CSS property gives hints to the browser about expected changes to an element's scroll position, contents, or style. These hints allow browsers to optimize for upcoming style changes.
In printed page layouts, the break-after, break-before, break-inside CSS properties control where printed pages start and end. Also known as pagination or page breaking.