Skip to content

FSCSS version 1.2.6

Latest

Choose a tag to compare

@Figsh Figsh released this 14 Oct 18:53
e571277

FSCSS (Figured Shorthand Cascading Style Sheet) version 1.2.6

Improvements:

@import output behavior

Chained imports now resolve fully. If c imports b and b imports a, b's own imports are resolved first, so everything arrives in c's output. This works for both * and named imports.

Relative paths resolve against the importing file. A ./a.fscss inside b is read relative to b, not the page or the working directory. This applies to local files and remote URLs.

Named imports carry their dependencies. Importing foo also brings along any @define that foo calls, and anything those call in turn. Carried dependencies keep their original names, even when foo is imported with an alias.

@import((foo as my-foo) from "./b.fscss")

Output contains @define myFoo(...) plus any @define blocks foo depends on, under their original names.

Duplicate and circular imports are handled.

  • Importing the same file with * more than once outputs it once. Later imports become /* Can't import <file> multiple times */.
  • Circular imports become /* Circular import: <file> */ instead of looping.
  • Failed imports become /* Failed import: <file> */.

Output is inserted as written. $ characters in imported code ($&, $1, etc.) are no longer interpreted, so imported CSS comes through unchanged.

Node build: duplicate tracking is now per call, so building several files in one process no longer blocks later builds.

Known limitation: a carried dependency can clash with a @define of the same name already in the importing file.

Full backward compatibility