Compile a CSS file with imports into a resolved CSS file without imports.
- Download the latest importaint version. See Download.
- Unzip importaint.
- In a terminal app, run important followed by the local path or URL to the CSS file that you want to compile.
NOTE: You can pass the following optional arguments to control the importaint behavior.--output
or-out
- define the output directory--minify
or-m
- minify the resolved CSS--remove_comments
or-rc
- remove/* comments */
from the resolved CSS--copy
or-c
- copy the resolved CSS output to system clipboard
- If needed, accept any security prompt. For more information, see Accepting macOS Security Prompts or Accepting Windows Security Prompts.
importaint "C:\GitHub\styling\style.css" --remove_comments
In the original CSS file directory, a new resolved CSS file without /* comments */
is created: C:\GitHub\styling\style_compiled.css
importaint "https://mysite.com/styles/style.css" --minify --copy
In the local directory that you are prompted about:
- The remote unresolved CSS file is downloaded
- A new resolved and minified CSS file is created
importaint "https://mysite.com/styles/style.css" -out "C:\MyStyles\StyleA"
In the output directory that you provided (C:\MyStyles\StyleA
)
- The remote unresolved CSS file is downloaded
- A new resolved CSS file is created