Xopus

Main Menu

  • Schemas
  • CSS
  • Chrome
  • Firefox
  • Fund

Xopus

Header Banner

Xopus

  • Schemas
  • CSS
  • Chrome
  • Firefox
  • Fund
CSS
Home›CSS›CSS Parcel parser offered as a performance booster

CSS Parcel parser offered as a performance booster

By Warren B. Obrien
January 14, 2022
0
0

Parcel CSS, a Rust-based CSS parser, compiler, and minifier, was announced this week and is positioned as a tool that offers performance and minification benefits.

Written in the Rust language, the tool handles the compilation of CSS modules as well as the tree structure and transpilation of CSS features such as nesting, logical properties and level 4 color syntax. Unveiled on January 12 by the creators of the parcel builder tool for the web, Parcel CSS can be found on GitHub. Parcel CSS can be used with Parcel or as a standalone library from JavaScript or Rust. It can also be integrated as a plug-in into other tools.

Developers can try out a live in-browser demo. According to a technology bulletin, Parcel CSS is fast not only because it was written in a native language, but also because it was designed to perform very well. The tool has memory optimizations such as representing vendor prefixes using single-byte flags and parsing CSS properties into structured data rather than representing them as strings that need to be parsed every use. Although positioned for speed, Parcel CSS doesn’t compromise on size, proponents said. It can produce smaller output than other tools in many cases because it has the ability to convert legacy CSS syntax used in many libraries to smaller, modern syntax. It also includes each individual CSS property.

Parcel CSS underpins the Rust crate cssparser, a browser-level tokenizer used in the Firefox browser. This is intended to provide a foundation that includes basic tokenization and analysis. Parcel users can try out Parcel CSS by adding the following to their .parcelrc to file:

{
  "extends": "@parcel/config-default",
  "transformers": {
    "*.css": ["@parcel/transformer-css-experimental"]
  },
  "optimizers": {
    "*.css": ["@parcel/optimizer-css"]
  }
}

Users must also add a browserlist property to their package.json to define the target browsers for which the target CSS will be compiled.

Copyright © 2022 IDG Communications, Inc.

Related posts:

  1. What are Cascading Style Sheets and what is CSS for?
  2. Update from the European Commission: The future revision of REACH and the restriction of PFAS | Jones Day
  3. The Greeting Cards Market Expected To Experience High Growth By 2026
  4. Virtual Healthcare Assistant Market to Grow Exponentially Between 2021 and 2028 | Key players – CSS Corp, eGain, idAvatars, Kognito, MedRespond

Recent Posts

  • Google Chrome adds virtual credit card numbers to protect your real ones – TechCrunch
  • How to take screenshots using the built-in screenshot tool in Mozilla Firefox on Windows 11 2022
  • Three Bard Faculty Pen Reviews for Artforum May 2022 Edition
  • 10 CSS background templates you can use on your website
  • Automotive Chromium Market Size and Overview 2022-2030 | Key Players – HELLA KGaA Hueck, Thule Group AB, Lund International, Covercraft Industries, Pep Boys – Manny

Archives

  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021

Categories

  • Chrome
  • CSS
  • Firefox
  • Fund
  • Schemas
  • Terms and Conditions
  • Privacy Policy