frontline-sass
v6.0.0
Published
Threespot's base Sass framework
Readme
Frontline Sass
Threespot's Sass framework
Testing
Tests are written in Sass using sass-true and run through Mocha. Each function and mixin in src/ has a matching partial in tests/ with the same name, registered in the folder's _index.scss.
yarn testAdding a test for a new helper
- Create
tests/<group>/_my-helper.scss(where<group>isfunctionsormixins). - Pull in sass-true and the library:
@use 'true' as *; @use '../../src/_frontline' as *; - Wrap assertions in
describe/itblocks. Useassert-equalfor functions that return a value, andassert { output { ... } expect { ... } }to compare emitted CSS for mixins. - Register the partial in
tests/<group>/_index.scsswith@forward "my-helper";.
Reference examples: tests/functions/_str-replace.scss (return value), tests/mixins/_visuallyhidden.scss (CSS output).
License
Frontline Sass is free software, and may be redistributed under the terms of the MIT license. If Frontline Sass works great for your project, we'd love to hear about it!
Thanks
Our work stands on the shoulders of giants, and we're very thankful to the many people that made Frontline Sass possible either by publishing code we used, or by being an inspiration for this project.
About Threespot
Threespot is an independent digital agency hell-bent on helping those, and only those, who are committed to helping others. Find out more at https://www.threespot.com.
