Releases: typestyle/csx
Releases · typestyle/csx
CSS Color Spacing + Optional alpha parameter for rgb/hsl
-
This releases adds spaces after , for color function to match the CSSOM output for computed properties. This is an attempt to improve testability of the css functions for consumers of the CSX library and to align more closely with the CSSOM.
-
Added optional alpha parameter to rgb() and hsl(). This is in an effort to more closely align with the CSSOM, but also makes switching between alpha channel colors and non-alpha channel colors much nicer.
Margin and Padding
Features
- Added helper for margin shorthand css property.
- Added helper for padding shorthand css property.
Background Fixes
Fixes
- Fixed background size output to use / between position and size.
- Added a more specific type definition that throws a type definition error when size is provided by position is undefined.
Deps upgrade (including moving to TypeScript 3), relaxed important
Fixes
- Relaxed important to infer any type (even though it is actually a string)
Dependencies
- Updated TypeScript to v3
- Added deep-extend as an explicit dev dependency to lock the version down
- Updated Rollup and other build tools
- Updated Jest for testing
Unit/string helpers
In this release, csx has the following additional helpers:
- url(): returns the string surrounded by url()
- quote(): returns the string surrounded by '' with any apostrophe's escaped
- px(), em(), rem(), percent(): return the number with the unit as suffix
- viewHeight() and viewWidth() return the number with vh and vw as suffixes respectively
Happy coding 🌹