facebook / stylex

StyleX is the styling system for ambitious user interfaces.
https://stylexjs.com
MIT License
8.21k stars 304 forks source link

feat: Enable support for types for CSS vars #543

Closed nmn closed 2 months ago

nmn commented 2 months ago

Adds the ability to give variables types using stylex.types.* functions.

Most of the work for this was already done, this PR does some of the final bits of work to expose the functionality in the Babel plugin and adds a few tests.


This PR also fixes a bug where stylex.keyframes couldn't be used as a value within stylex.createTheme.

github-actions[bot] commented 2 months ago

compressed-size: runtime library

Size change: 0.00 kB Total size: 2.52 kB

View unchanged | Filename: gzip (minify) | kB size | kB change | % change | | :--- | :--- | :--- | :--- | | `./packages/stylex/lib/stylex.js` | **1.04** (3.22) | **0.00** (0.00) | **0.0%** (0.0%) | | `./packages/stylex/lib/StyleXSheet.js` | **1.48** (3.75) | **0.00** (0.00) | **0.0%** (0.0%) |
github-actions[bot] commented 2 months ago

compressed-size: e2e bundles

Size change: 0.00 kB Total size: 1132.93 kB

View unchanged | Filename: gzip (minify) | kB size | kB change | % change | | :--- | :--- | :--- | :--- | | `./apps/rollup-example/.build/bundle.js` | **1006.63** (10188.26) | **0.00** (0.00) | **0.0%** (0.0%) | | `./apps/rollup-example/.build/stylex.css` | **126.30** (796.17) | **0.00** (0.00) | **0.0%** (0.0%) |