mirror of
https://github.com/deuill/fawkss.git
synced 2024-09-27 19:52:43 +00:00
Alex Palaistras
984c36cc2d
This adds support for SASS-style `@import` declarations, for transparently including external `.scss` files in the resulting markup. File names are resolved as per the rules set by SASS (i.e. importing a file named "include/common" will search for "_common.scss" as well as "common.scss"). The entire source code had to be restructured around the idea of having to switch the file context transparently, and is now based around double `while` loops, one for checking the current context and the other for checking the current line via `getline`. The included test-suite may need some cleaning up, and the source code most definitely will. More to come.
22 lines
277 B
SCSS
22 lines
277 B
SCSS
//
|
|
// Simple include tests for Fawkss.
|
|
//
|
|
|
|
--- TEST ---
|
|
|
|
@include "includes/partial"
|
|
@include "includes/full.scss"
|
|
|
|
--- EXPECTED ---
|
|
|
|
.partial {
|
|
content: 'This is a partial';
|
|
}
|
|
|
|
.full {
|
|
content: 'This is a full include';
|
|
color: #fff;
|
|
background-color : #000;
|
|
}
|
|
|
|
--- END --- |