CodeMaster/public/css/mixin/_table-layout.scss

17 lines
471 B
SCSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* [tableLayout 模拟table布局垂直居中对齐只传两个参数将识别为水平垂直居中]
* @param {[string]} $parent [eg'.parent']
* @param {[string]} $child [eg'.child']
* @param {[string]} $align [egcenter可选参数默认为水平居中]
*/
@mixin tableLayout($parent, $child, $align: center) {
#{$parent} {
display: table;
#{$child} {
display: table-cell;
text-align: $align;
vertical-align: middle;
}
}
}