2.1.0 • Published 5 months ago

@acusti/styling v2.1.0

Weekly downloads
-
License
Unlicense
Repository
github
Last release
5 months ago

@acusti/styling

latest version maintenance status downloads per month bundle size

This package exports Style, which is a React component that takes a CSS string as its children, minifies it, and renders it using the react v19+ <style> element’s special rendering behavior:

React will move <style> components to the document’s <head>, de-duplicate identical stylesheets, and suspend while the stylesheet is loading.

This behavior is SSR-friendly (no server hydration errors), and the suspense behavior ensures any assets used by the CSS styles that must be fetched and parsed (e.g. fonts or images) can do so with a loading behavior as-good or better than the way regular CSS stylesheets or inline styles are handled by the browser.

The CSS minification means that insignifant differences between styles (e.g. varying whitespace or empty declarations) won’t result in sthyle duplication. Also, the component maintains an internal global cache of the minified styles to avoid unnecessary re-calculations.

Lastly, this package exports useful CSS string literals, such as SYSTEM_UI_FONT which can be used as font-family: ${SYSTEM_UI_FONT}; to specify the appropriate UI font for the current OS and browser.

1.1.1

5 months ago

1.1.0

6 months ago

1.0.1

9 months ago

1.0.0

10 months ago

2.1.0

5 months ago

2.0.1

5 months ago

2.0.0

5 months ago

1.0.0-rc.1

1 year ago

1.0.0-rc.0

1 year ago

0.7.2

2 years ago

0.7.1

2 years ago

0.7.0

2 years ago

0.6.0

3 years ago

0.6.0-alpha

3 years ago

0.5.2-alpha

3 years ago

0.6.0-alpha2

3 years ago

0.5.3

3 years ago

0.6.0-alpha3

3 years ago

0.6.0-beta

3 years ago

0.5.2

3 years ago

0.5.2-alpha2

3 years ago

0.5.1

3 years ago

0.5.0

3 years ago

0.4.0

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago