Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Unit FluxNew to Visual Studio Code? Get it now.
Unit Flux

Unit Flux

Alvin Bellero

|
44 installs
| (0) | Free
| Sponsor
Seamlessly convert pixels (px) to other units for fluid and responsive CSS designs
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Unit Flux — VSCode Extension

Seamlessly convert pixels (PX) to other units for fluid and responsive CSS designs!

✨ Features

  • Automatic Conversion: Converts pixels px values in your CSS files to rem or em units effortlessly.
  • CodeLens Support: Easily convert values with a single click directly in your code editor. 💡
  • Customizable Settings: Set your default decimal places and base font size for conversions in the settings. ⚙️
  • Inline Replacement: Replace values inline for a cleaner code experience. ✏️

Sample Preview

Sample Preview

📦 Installation

  1. Open Visual Studio Code.
  2. Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side.
  3. Search for Unit Flux and click Install.

🛠️ Usage

  • Once installed, open any style file (css | scss | less).
  • UnitFlux will detect the pixel values and provide the Code Lens.
  • Click on the CodeLens to convert the value to rem or em.
  • See the magic happens! 🪄

⚙️ Configuration

You can customize the extension settings by adding the following configuration in your settings.json:

{
  "unitFlux.baseFontSize": 16, // Set base font size for conversion
  "unitFlux.enableCodeLens": true, // Toggle Code Lens feature
  "unitFlux.defaultDecimalPlaces": 4 // Set default decimal places for conversion
}

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft