-
Notifications
You must be signed in to change notification settings - Fork 1
Wrapper()
esr360 edited this page Jan 17, 2020
·
3 revisions
The wrapper()
mixin allows you to wrap a module (or a collection of the same module) within a wrapper element. This element acts as a Cell module, and is passed a modifier corresponding to the name of the wrapped module.
@include wrapper($namespace, $scope);
<div class="wrapper--header">
<div class="header">...</div>
</div>
@include module('header') {
...
@include wrapper {
position: relative;
}
}
.header, [class*="header--"] {
...
}
[class*="wrapper--"][class*="--header"] {
position: relative;
}
Type | string |
Description | [required] the module name to use when rendering the wrapper |
Default | 'wrapper' |
Type | string |
Description | [required] the scope/modifier to use when rendering the wrapper |
Default | $module |
For semantic purposes, Cell offers a group
alias for the wrapper mixin:
<div class="group--button">
<div class="button">...</div>
<div class="button">...</div>
<div class="button">...</div>
</div>
@include module('button') {
...
@include group {
margin-bottom: 20px;
}
}