Front-end development made for a green future!
- Follows OOCSS principles
- Develop faster and more efficient. No more writing classes to set paddings, margins en positions.
- Separates structure from styling
- Space Framework is build on top of Foundation. Which can be found here: http://foundation.zurb.com/
bower install spaceframework --save
- Make sure you have at least included the following Foundation files:
@import 'foundation-sites/scss/util/_unit.scss';
@import 'foundation-sites/scss/util/_breakpoint.scss';
- Include the
scss/_spaceframework.scss
file into your SASS folder to initialize the SpaceFramework, for example:
@import '../../components/spaceframework/scss/spaceframework';
- Make a copy of
scss/settings/_space-model.scss
and add it to your local SASS variable folder. - In
space-model.scss
Remove the!default
attribute from the variables$space-settings
and$space-object-settings
. - Add the code below to the location were you actually want to load the set of generated classes.
@include space-init();
- You're all set! Enjoy
.site-padding
.site-margin
.site-position
You can add -absolute
and -fixed
classes to define the type of position:
.site-absolute
.site-fixed
You can use direction specific classes by adding -top
, left
, -vertical
etc:
.site-padding-left
.site-padding-right
.site-margin-left
.site-margin-horizontal
.site-position-top
.medium-site-padding
.large-site-margin
.small-only-site-padding
.medium-only-site-padding
.large-only-site-margin
- Notice:
.small-
classes are not generated, you should use the base class instead. However.small-only-
classes can be used.
This generates negative values like: margin: -2rem;
instead of margin: 2rem;
.site-margin-horizontal-negative
Proudly made in the Netherlands by @HarwinBorger