File includes function and mixins which help with positioning different type of elements
- Mixin size (bootstrap 4.0.0)
- Mixin clearfix (bootstrap 4.0.0)
- Mixin z-index
- Mixin pseudo
- Mixin absolute
- Mixin fixed
- Mixin relative
- Mixin sticky
Default variables declared in file to be used in mixins.
$z-indexes: (
'modal',
'header',
'body',
'footer'
) !default;
Bootstrap helper which helps setting width and height of element
$width
- variable describing width (required)$height
- variable describing height (default$width
)
Bootstrap helper. Applicable to parent class if children elements use float property. If you don't use this, the container won't get any height
Mixin which sets z-index value appropriate to name's position in $z-indexes
.
Thanks to this solution the order has been preserved for every item.
If $z-indexes
doesn't contain given name there will be displayed error with appropriate information
$name
- string with name which should be included in$z-indexes
(required)
Assigned appropriate z-index for header
.exampleZClass {
@include z-index('header');
}
Mixin which helps with positioning pseudo elements with content, display and position properties.
$display
- variable which will be used as a value fordisplay
(defaultblock
)$content
- variable which will be used as a value forcontent
(default empty string)
Assigned element with inline display and default content
.examplePseudoClass {
&:before {
@include pseudo(block);
...
}
&:after {
@include pseudo;
...
}
}
Mixin which helps to add position absolute with additional (optional) properties to class
$args
- variable(s) which will be used as a value(s) fortop right bottom left
properties (default empty string)
Assigned position absolute without additional properties
.exampleAbsoluteClass {
@include absolute(top 0 left 0 bottom 0);
}
Mixin which helps to add position fixed with additional (optional) properties to class
$args
- variable(s) which will be used as a value(s) fortop right bottom left
properties (default empty string)
Assigned position fixed without additional properties
.exampleFixedClass {
@include fixed(left 50% bottom 150px);
}
Mixin which helps to add position relative with additional (optional) properties to class
$args
- variable(s) which will be used as a value(s) fortop right bottom left
properties (default empty string)
Assigned position relative without additional properties
.exampleRelativeClass {
@include relative;
}
Mixin which helps to add position sticky with additional (optional) properties to class
$args
- variable(s) which will be used as a value(s) fortop right bottom left
properties (default empty string)
Assigned position sticky without additional properties
.exampleStickyClass {
@include sticky;
}