Skip to content

Bashamega/css-measurements

Repository files navigation

CSS Measurements (Work in progress)

Type-safe CSS units — straight from the spec to your code.

CSS Measurements is a library designed to simplify working with CSS units in a type-safe manner. With this library, you can leverage TypeScript to ensure that your CSS units are correctly implemented and aligned with the CSS specification.


Features

  • Type-safe CSS units: Ensure your CSS units are valid and correctly used.
  • Straight from the spec: Built based on the official CSS specification.
  • TypeScript-first: Designed with TypeScript as the primary language for a seamless developer experience.
  • JavaScript support: Works seamlessly with JavaScript projects as well.

Packages List

Package Description
@css-m/all All CSS definitions for measurements
@css-m/absolute-length-units CSS definitions for absolute length units
@css-m/container-units CSS definitions for container units
@css-m/distance-units CSS definitions for distance units
@css-m/local-font-relative-lengths CSS definitions for local font relative lengths
@css-m/root-font-relative-lengths CSS definitions for root font relative lengths
@css-m/viewport-units CSS definitions for viewport units

Why Use CSS Measurements?

Working with raw strings for CSS units can lead to errors and inconsistencies. This library eliminates such issues by providing type-safe utilities for CSS units. Whether you're working on a large-scale project or a small application, css-measurements ensures robust and error-free styling.


Contributing

We welcome contributions! If you'd like to help improve css-measurements, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or fix.
  3. Commit your changes and push them to your fork.
  4. Submit a pull request.

License

This project is licensed under the MIT License.


Acknowledgments

Special thanks to the CSS and TypeScript communities for inspiring this project.

About

Type-safe CSS units — straight from the spec to your code.

Resources

License

Stars

Watchers

Forks

Packages

No packages published