Skip to content

v1.1.0

Latest
Compare
Choose a tag to compare
@arkarlov arkarlov released this 24 Oct 19:33

Cleaner, Leaner CSS

v1.1.0 (2024-10-24)

✨ Stripped spaces between CSS rules.

Whitespace between CSS rules has been removed for more compact output.

stringifyCSSProperties({
  flex: 1,
  padding: 20,
  backgroundColor: "teal",
});

Before

// Output: "flex:1; padding:20px; background-color:teal;"

After

// Output: "flex:1;padding:20px;background-color:teal;"

🧹 Removed empty CSS rules from the output in stringifyStyleMap.

Previously, passing 'selector': {} resulted in selector{}, but now such rules are excluded from the result.

stringifyStyleMap({
      header: { color: "teal" },
      main: {},
      footer: { color: "teal" },
    });

Before

// Output: "header{color:teal;} main{} footer{color:teal;}"

After

// Output: "header{color:teal;}footer{color:teal;}"

✂️ Trimmed unnecessary spaces in CSS selectors.

Extra spaces around combinators (e.g., >, +, ~) are now removed.

stringifyStyleMap({
  "#root ul.my-list > li": {
    padding: 10,
  },
});

Before

// Output: "#root ul.my-list > li{padding:10px;}"

After

// Output: "#root ul.my-list>li{padding:10px;}"

🤖 What's Changed

Full Changelog: v1.0.0...v1.1.0