Comparing version 1.0.0 to 1.1.0
{ | ||
"name": "csz", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Runtime CSS modules with SASS like preprocessing", | ||
"main": "index.js", | ||
"module": "index.js", | ||
"keywords": [ | ||
@@ -7,0 +8,0 @@ "css", |
@@ -33,7 +33,7 @@ # csz | ||
Both variations (static and dynamic) are sync and return a string in a format similar to `csz-b60d61b8`. If a ruleset is provided as a string then it is processed immedietly but if a filepath is provided then processing is deffered until the contents of the file has been fetched. | ||
Both variations (static and dynamic) are sync and return a string in a format similar to `csz-b60d61b8`. If a ruleset is provided as a string then it is processed immediately but if a filepath is provided then processing is deferred until the contents of the file has been fetched. | ||
> All file paths must start with a `/` and be absolute (relative to the current hostname) so if you are running your app on `example.com` and require `/styles/index.css` then csz will try fetch it from `example.com/styles/index.css`. | ||
Styles imported from a file are inevitably going to some amount of time to download. Whilst the stylesheet is being downloaded a temporary ruleset is applied to the element which hides it (using `display: none`) until the fetched files have been processed. This was implemented to prevent flashes of unstyled content. | ||
Styles imported from a file are inevitably going to take some amount of time to download. Whilst the stylesheet is being downloaded a temporary ruleset is applied to the element which hides it (using `display: none`) until the fetched files have been processed. This was implemented to prevent flashes of unstyled content. | ||
@@ -40,0 +40,0 @@ See below for an example of what a raw ruleset might look like and how it looks like after processing. |
19025