- Foundation 常規
- Foundation - 全域性樣式
- Foundation - Sass
- Foundation - JavaScript
- Foundation - JavaScript 工具函式
- Foundation - 媒體查詢
- Foundation - 網格
- Foundation - Flex 網格
- Foundation - 表單
- Foundation - 可見性類
- Foundation - 基礎排版
- Foundation - 排版輔助類
- Foundation - 基本控制元件
- Foundation - 導航
- Foundation - 容器
- Foundation - 媒體
- Foundation - 外掛
- Foundation SASS
- Foundation - Sass 函式
- Foundation - Sass 混合宏
- Foundation 庫
- Foundation - Motion UI
- Foundation 有用資源
- Foundation - 快速指南
- Foundation - 有用資源
- Foundation - 討論
基礎 - SASS 混合宏
最終的 CSS 輸出是使用混合宏構建的。混合宏可以用來根據這些元件構建自己的類結構。以下是用於構建最終 CSS 輸出的混合宏。
grid-column
建立網格列。
@include grid-column($columns, $gutter);
| 序號 | 名稱和描述 | 型別 | 預設值 |
|---|---|---|---|
| 1 |
$columns 設定列的寬度。grid-column() 函式用於獲取可用值。 |
混合 | $grid-column-count |
| 2 |
$gutter 在列之間建立間距。 |
數字 | $grid-column-gutter |
grid-column-row
將行和列類等效地包含到同一個元素中。grid-col-row() 是假設的函式。
@include grid-column-row($gutter);
| 序號 | 名稱和描述 | 型別 | 預設值 |
|---|---|---|---|
| 1 |
$gutter 在列行的兩側設定間距的寬度。 |
數字 | $grid-column-gutter |
grid-column-collapse
移除填充後,列上的間距會摺疊。假設的函式是grid-col-collapse()
@include grid-column-collapse;
grid-column-uncollapse
重新新增填充後,列上的間距會展開。假設的函式是grid-col-uncollapse()
@include grid-column-uncollapse;
grid-layout
設定子元素的大小,以便在$n中指定的數量出現在每一行。
@include grid-layout($n, $selector);
| 序號 | 名稱和描述 | 型別 | 預設值 |
|---|---|---|---|
| 1 |
$n 每行顯示的元素數量。 |
數字 | 無 |
| 2 |
$selector 用於子元素的選擇器。 |
字串 | '.column' |
grid-column-position
重新排列列。假設的函式是grid-col-pos()。
@include grid-column-position($position);
| 序號 | 名稱和描述 | 型別 | 預設值 |
|---|---|---|---|
| 1 |
$position 根據指定的列數設定列移動的方向。負數將列推向左側,正數將列推向右側。 |
數字 | 無 |
grid-column-unposition
重置列位置。假設的函式是grid-col-unpos()。
@include grid-column-unposition;
grid-column-offset
列向右偏移$n列。假設的函式是grid-col-off()。
@include grid-column-offset($n);
| 序號 | 名稱和描述 | 型別 | 預設值 |
|---|---|---|---|
| 1 |
$n grid-column() 混合宏接受任何傳遞的值。 |
數字或列表 | 無 |
grid-column-end
停用行中最後一列的預設行為,即對齊到相對邊。假設的函式是grid-col-end()。
@include grid-column-end;
grid-context
要使用不同的列,應更改在此混合宏中定義的列的行為。
@include grid-context($columns, $root) { }
| 序號 | 名稱和描述 | 型別 | 預設值 |
|---|---|---|---|
| 1 |
$columns 要使用的列數。 |
數字 | 無 |
| 2 |
$root 在混合宏中,當設定為 false 時,選擇器將在父選擇器內巢狀。 |
布林值 | false |
grid-row
建立一個網格行。
@include grid-row($columns, $behavior, $width, $cf) { }
| 序號 | 名稱和描述 | 型別 | 預設值 |
|---|---|---|---|
| 1 |
$columns 設定此行的列數。 |
數字 | 空 |
| 2 |
$behavior 修改預設的網格樣式。 |
關鍵字 | 空 |
| 3 |
$width 行的最大寬度。 |
數字 | $grid-row-width |
| 4 |
$cf 是否包含清除浮動。 |
布林值 | true |
grid-column-size
設定網格列寬度。
@include grid-column-size($width);
| 序號 | 名稱和描述 | 型別 | 預設值 |
|---|---|---|---|
| 1 |
$width grid-column() 函式接受任何傳遞的值。設定列的寬度。 |
數字或列表 | $grid-column-count |
foundation_the_grid.htm
廣告