mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 12:08:13 +08:00
33686a375e
* 使用自定义 css 属性初步,支持大部分组件的展现 * button 大部分可以看了 * cxd 和 dark 大部分正常 * 修复一些细节样式错误;补充 css 变量的文档 * 修复几个脚本发现的错误 * 完善一下注释 * 修复一些样式不一致问题 * 修复可能存在的 css xss * 恢复 font-variant 功能 * 修复绝大部分 @if 相关的问题 * 恢复之前的注释 * 修复小错误,并将所有 background-color 改成 background,这样就能设置渐变色 * 修复 button group 在 cxd 下不一致问题 * 缩小查看配置和复制配置的宽度,留出更多空间 * 修复一些潜在的错误 * 恢复 utilities 中 label 背景色的设置 * 修复错误的 css 变量 * 补充 IE11 Variables Polyfill
83 lines
2.6 KiB
SCSS
83 lines
2.6 KiB
SCSS
/*!markdown
|
||
|
||
---
|
||
title: Display
|
||
---
|
||
|
||
布局相关样式。
|
||
|
||
|
||
| Class | Properties |
|
||
| ------------------ | ---------------------------- |
|
||
| block | display: block; |
|
||
| inline-block | display: inline-block; |
|
||
| inline | display: inline; |
|
||
| flex | display: flex; |
|
||
| inline-flex | display: inline-flex; |
|
||
| table | display: table; |
|
||
| table-cell | display: table-cell; |
|
||
| table-column | display: table-column; |
|
||
| table-column-group | display: table-column-group; |
|
||
| table-footer-group | display: table-footer-group; |
|
||
| table-header-group | display: table-header-group; |
|
||
| table-row-group | display: table-row-group; |
|
||
| table-row | display: table-row; |
|
||
| flow-root | display: flow-root; |
|
||
| grid | display: grid; |
|
||
| inline-grid | display: inline-grid; |
|
||
| contents | display: contents; |
|
||
| hidden | display: hidden; |
|
||
|
||
## 用法
|
||
css 相关的知识点就不介绍了,请参考:
|
||
|
||
https://www.w3school.com.cn/cssref/pr_class_display.asp
|
||
https://tailwindcss.com/docs/display
|
||
|
||
# 响应式设计
|
||
|
||
支持通过添加设备前缀 `m:` 或者 `pc:` 来分别针对「手机端」或者「pc端」设置样式,更多说明请前往[「响应式设计」](../../../docs/style/responsive-design.md)。
|
||
|
||
## 状态前缀
|
||
|
||
不支持[「状态前缀」](../../../docs/style/state.md),有需求请提 [issue](https://github.com/baidu/amis/issues)。
|
||
|
||
*/
|
||
@mixin make-display($prefix: '.') {
|
||
@each $name,
|
||
$value
|
||
in (
|
||
'block': block,
|
||
'inline-block': inline-block,
|
||
'inline': inline,
|
||
'flex': flex,
|
||
'inline-flex': inline-flex,
|
||
'table': table,
|
||
'table-caption': table-caption,
|
||
'table-cell': table-cell,
|
||
'table-column': table-column,
|
||
'table-column-group': table-column-group,
|
||
'table-footer-group': table-footer-group,
|
||
'table-header-group': table-header-group,
|
||
'table-row-group': table-row-group,
|
||
'table-row': table-row,
|
||
'flow-root': flow-root,
|
||
'grid': grid,
|
||
'inline-grid': inline-grid,
|
||
'contents': contents,
|
||
'hidden': none
|
||
)
|
||
{
|
||
#{$prefix + $name} {
|
||
display: $value;
|
||
}
|
||
}
|
||
}
|
||
|
||
@include make-display();
|
||
@each $deivce in map-keys($devices) {
|
||
@include media-device($deivce) {
|
||
@include make-display('.' + selector-escape($deivce + ':'));
|
||
}
|
||
}
|