Css attributes

Firefox 96 improves CSS and Canvas support for developers

Mozilla released Firefox 96, a browser update that supports new CSS properties and functions, and adds image encoder support for the WebP format to the Canvas API.

Firefox 96 was released to release channel users on January 11. For CSS, Firefox now supports color-scheme , which allows an element to indicate in which color combinations it can be rendered comfortably. Also counter-reset property now supports reversed() function to build reverse CSS counters, which are meant to number elements in descending order. the reversed() the function can be used with the list-item counter to number ordered lists in reverse order.

Also for CSS, the hwb() function to use as CSS color value has been implemented. the hwb() describes a color according to its hue, whiteness and darkness.

Firefox’s Canvas API for drawing graphics, meanwhile, benefits from image encoder support for the WebP image format. This allows canvas elements to export content as WebP data when using methods such as HTMLCanvasElement.toDataURL() and HTMLCanvasElement.toBlob().

Mozilla’s Firefox 96 developer bulletin cites no notable changes to HTML or JavaScript. But other relevant changes for developers include the following:

  • Cookies sent from the same domain but using different schemes are now considered to be from different sites with respect to the SameSite cookie directive. Also, cookies are assumed to be implicitly set SameSite=Lax if the SameSite attribute is not specified, and cookies with SameSite=None require a secure context.
  • The canShare() The API is now supported on Android, allowing code to check if navigationator.share() will be successful for particular targets. Additionally, the experimental Web Locks API is enabled by default, allowing web applications running in multiple tabs or workers to coordinate resource usage.
  • For the overseas departments, the IntersectionObserver() constructor now sets the default rootMargin if an empty string is passed in the associated parameter option, rather than throwing an exception.

Elsewhere in Firefox 96, improvements have been made to noise suppression, automatic gain control and echo cancellation to provide a better overall sound experience. Main wire load has also been reduced. For security reasons, Firefox will now enforce Cookie Policy: Same-Site=lax by default to defend against cross-site request forgery attacks.

Copyright © 2022 IDG Communications, Inc.