文档补充

This commit is contained in:
2betop 2020-11-30 14:50:04 +08:00
commit f35ba81dc4
52 changed files with 1943 additions and 1594 deletions

View File

@ -10,6 +10,11 @@ order: 18
amis 中有大量的功能类 class 可以使用,即可以用在 schema 中,也可以用在自定义组件开发中,掌握这些 class, 几乎可以不用写样式。
<div class="bg-pink-500 text-light shadow p-4 rounded-md hover:bg-pink-600">
<div class="text-lg b-b p-b-sm">注意</div>
<div class="p-t-xs">CSS辅助类样式做了全新的升级请前往<a class="text-light underline hover:text-pink-300" href="/style">新版样式</a>查看使用文档。旧版本可以继续,但将不再做迭代更新。</div>
</div>
## 基本使用
例如,下面这个例子,我们内容区渲染了两个按钮,但是可以看到,两个按钮紧贴在一起,并不是很美观,于是我们想添加一定的间隔
@ -17,7 +22,7 @@ amis 中有大量的功能类 class 可以使用,即可以用在 schema 中,
```schema:height="100" scope="body"
[
{
"type": "action",
"type": "button",
"label": "按钮1",
"actionType": "dialog",
"dialog": {
@ -26,7 +31,7 @@ amis 中有大量的功能类 class 可以使用,即可以用在 schema 中,
}
},
{
"type": "action",
"type": "button",
"label": "按钮2",
"actionType": "dialog",
"dialog": {
@ -44,7 +49,7 @@ amis 中有大量的功能类 class 可以使用,即可以用在 schema 中,
```schema:height="100" scope="body"
[
{
"type": "action",
"type": "button",
"label": "按钮1",
"actionType": "dialog",
"dialog": {
@ -53,7 +58,7 @@ amis 中有大量的功能类 class 可以使用,即可以用在 schema 中,
}
},
{
"type": "action",
"type": "button",
"label": "按钮2",
"className": "m-l",
"actionType": "dialog",

View File

@ -0,0 +1,67 @@
---
title: 快速开始
---
amis 参考 [tailwindcss](https://tailwindcss.com/) 加入了大量的帮助类 css掌握这些用法完全不用手写 css。
理念来自[tailwindcss](https://tailwindcss.com/), 不过这边做了一定的筛选,把一些不常用的用法剔除了,另外响应式方面只做了 pc 端和手机端,其他的设备并没有支持。这个文件未压缩版本大概是 300K 左右,比官方的要小很多。目前这个文件没有和主题文件合并在一起,用户可以选择性加载。
```html
<link rel="stylesheet" href="amis/lib/utilities.css" />
```
引入这个 css 后,就可以像下面那样直接给 html 标签加类名的方式来设定样式了。
```html
<div
class="p-6 m-auto max-w-sm m-x-auto bg-white rounded-xl shadow-md flex items-center space-x-4"
>
<div class="flex-shrink-0">
<svg
class="h-12 w-12"
viewBox="0 0 40 40"
xmlns="http://www.w3.org/2000/svg"
>
<defs>
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="a">
<stop stop-color="#2397B3" offset="0%"></stop>
<stop stop-color="#13577E" offset="100%"></stop>
</linearGradient>
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="b">
<stop stop-color="#73DFF2" offset="0%"></stop>
<stop stop-color="#47B1EB" offset="100%"></stop>
</linearGradient>
</defs>
<g fill="none" fill-rule="evenodd">
<path
d="M28.872 22.096c.084.622.128 1.258.128 1.904 0 7.732-6.268 14-14 14-2.176 0-4.236-.496-6.073-1.382l-6.022 2.007c-1.564.521-3.051-.966-2.53-2.53l2.007-6.022A13.944 13.944 0 0 1 1 24c0-7.331 5.635-13.346 12.81-13.95A9.967 9.967 0 0 0 13 14c0 5.523 4.477 10 10 10a9.955 9.955 0 0 0 5.872-1.904z"
fill="url(#a)"
transform="translate(1 1)"
></path>
<path
d="M35.618 20.073l2.007 6.022c.521 1.564-.966 3.051-2.53 2.53l-6.022-2.007A13.944 13.944 0 0 1 23 28c-7.732 0-14-6.268-14-14S15.268 0 23 0s14 6.268 14 14c0 2.176-.496 4.236-1.382 6.073z"
fill="url(#b)"
transform="translate(1 1)"
></path>
<path
d="M18 17a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM24 17a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM30 17a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"
fill="#FFF"
></path>
</g>
</svg>
</div>
<div>
<div class="text-xl font-medium text-black">ChitChat</div>
<p class="text-gray-500">You have a new message!</p>
</div>
</div>
```
比如这个栗子:
- 通过 `flex` `flex-shrink-0` 来设置布局方式。
- 通过 `bg-blue-100` `bg-white` 之类的类名设置背景色。
- 通过 `shadow-md` 设置投影。
- 通过 `rounded-xl` 设置圆角。
- 通过 `text-xl`、`font-medium` 设置字体大小粗细。
- 等等。。

View File

@ -0,0 +1,13 @@
---
title: 响应式设计
---
响应式设计目前只支持 pc 端和手机端,其他设备目前不支持,貌似也没必要支持。默认就是 pc如果你在 css 类名前面再加个 `mobile:` 开头,就是专门给移动设备设置样式了。
```html
<div class="text-black-500 mobile:text-red-500">
这是一段文字pc 端我是黑色的,在移动端查看,我是红色的。
</div>
```
几乎所有的类名都可以在开头处加个 `mobile:` 用来表示是移动端样式。

View File

@ -0,0 +1,13 @@
---
title: 状态样式
---
响应式设计目前只支持 pc 端和手机端,其他设备目前不支持,貌似也没必要支持。默认就是 pc如果你在 css 类名前面再加个 `mobile:` 开头,就是专门给移动设备设置样式了。
```html
<div class="text-black-500 mobile:text-red-500">
这是一段文字pc 端我是黑色的,在移动端查看,我是红色的。
</div>
```
几乎所有的类名都可以在开头处加个 `mobile:` 用来表示是移动端样式。

View File

@ -24,7 +24,8 @@ import Select from '../../src/components/Select';
import DocSearch from './DocSearch';
import Doc, {docs} from './Doc';
import Example, {examples} from './Example';
import Style from './Style';
import CssDocs, {cssDocs} from './CssDocs';
import CSSDocs from './CssDocs';
let ExamplePathPrefix = '/examples';
let DocPathPrefix = '/docs';
@ -36,6 +37,10 @@ if (process.env.NODE_ENV === 'production') {
ContextPath = '/amis';
}
export function getContextPath() {
return ContextPath;
}
const themes = [
{
label: '默认主题',
@ -227,7 +232,7 @@ export class App extends React.PureComponent {
</Link>
<Link to={`${ContextPath}/style`} activeClassName="is-active">
</Link>
<a
href="https://github.com/fex-team/amis-editor-demo"
@ -462,8 +467,6 @@ export default function entry({pathPrefix}) {
// PathPrefix = pathPrefix || DocPathPrefix;
return (
<Router history={browserHistory}>
<Route path={`${ContextPath}/style`} component={Style}></Route>
<Route component={App}>
<Redirect from={`${ContextPath}/`} to={`${ContextPath}/docs/index`} />
<Redirect
@ -474,6 +477,10 @@ export default function entry({pathPrefix}) {
from={`${ContextPath}/examples`}
to={`${ContextPath}/examples/pages/simple`}
/>
<Redirect
from={`${ContextPath}/style`}
to={`${ContextPath}/style/index`}
/>
<Route path={`${ContextPath}/docs`} component={Doc}>
{navigations2route(DocPathPrefix, docs)}
@ -481,6 +488,9 @@ export default function entry({pathPrefix}) {
<Route path={`${ContextPath}/examples`} component={Example}>
{navigations2route(ExamplePathPrefix, examples)}
</Route>
<Route path={`${ContextPath}/style`} component={CSSDocs}>
{navigations2route(ExamplePathPrefix, cssDocs)}
</Route>
</Route>
<Route path="*" component={NotFound} />

View File

@ -0,0 +1,85 @@
import React from 'react';
import makeMarkdownRenderer from './MdRenderer';
export const cssDocs = [
{
label: '📌 开始',
children: [
{
label: '快速开始',
path: '/style/index',
getComponent: (location: any, cb: any) =>
(require as any)(
['../../docs/css-utilities/index.md'],
(doc: any) => {
cb(null, makeMarkdownRenderer(doc));
}
)
},
{
label: '响应式设计',
path: '/style/responsive-design',
getComponent: (location: any, cb: any) =>
(require as any)(
['../../docs/css-utilities/responsive-design.md'],
(doc: any) => {
cb(null, makeMarkdownRenderer(doc));
}
)
},
{
label: '状态样式',
path: '/style/state',
getComponent: (location: any, cb: any) =>
(require as any)(
['../../docs/css-utilities/state.md'],
(doc: any) => {
cb(null, makeMarkdownRenderer(doc));
}
)
}
]
},
{
// prefix: ({classnames: cx}) => <li className={cx('AsideNav-divider')} />,
children: [
{
label: 'CSS',
path: '/style/css',
getComponent: (location: any, cb: any) =>
(require as any)(
['../../scss/utilities/background/_background-color.scss'],
(doc: any) => {
cb(null, makeMarkdownRenderer(doc));
}
)
}
]
}
];
export default class CSSDocs extends React.PureComponent<any> {
componentDidMount() {
this.props.setNavigations(cssDocs);
}
componentDidUpdate() {
this.props.setNavigations(cssDocs);
}
render() {
return (
<>
{React.cloneElement(this.props.children as any, {
...(this.props.children as any).props,
theme: this.props.theme,
classPrefix: this.props.classPrefix,
locale: this.props.locale,
viewMode: this.props.viewMode,
offScreen: this.props.offScreen
})}
</>
);
}
}

View File

@ -110,7 +110,7 @@
sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
}
.markdown-body a:not(.btn) {
/* .markdown-body a:not(.btn) {
color: #4078c0;
text-decoration: none;
}
@ -119,7 +119,7 @@
.markdown-body a:active:not(.btn) {
color: #4078c0;
text-decoration: underline;
}
} */
.markdown-body hr {
height: 0;
@ -758,6 +758,20 @@
margin-bottom: 15px;
}
.amis-doc pre {
margin-top: 15px;
.amis-doc > .preview {
padding-top: 3rem;
padding-bottom: 3rem;
padding-left: 1.5rem;
padding-right: 1.5rem;
overflow: hidden;
border-top-left-radius: 0.75rem;
border-top-right-radius: 0.75rem;
background-color: #dbeafe;
}
.amis-doc > pre {
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 0.75rem;
border-bottom-right-radius: 0.75rem;
}

View File

@ -1,81 +1,55 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8" />
<title>amis - 低代码前端框架</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="image/x-icon" rel="shortcut icon" href="./static/favicon.png" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1"
/>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<link rel="stylesheet" href="./static/iconfont.css" />
<link rel="stylesheet" href="font-awesome/css/font-awesome.css" />
<link rel="stylesheet" href="bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="animate.css/animate.css" />
<link rel="stylesheet" href="prismjs/themes/prism.css" />
<!--DEPENDENCIES_INJECT_PLACEHOLDER-->
<link rel="stylesheet" href="./doc.css" />
<link rel="stylesheet" title="default" href="../scss/themes/default.scss" />
<link
rel="stylesheet"
title="default"
href="../scss/themes/default-utilities.scss"
/>
<link
rel="stylesheet"
title="cxd"
disabled
href="../scss/themes/cxd.scss"
/>
<link
rel="stylesheet"
title="cxd"
disabled
href="../scss/themes/cxd-utilities.scss"
/>
<link
rel="stylesheet"
title="dark"
disabled
href="../scss/themes/dark.scss"
/>
<link
rel="stylesheet"
title="dark"
disabled
href="../scss/themes/dark-utilities.scss"
/>
<link rel="stylesheet" href="./style.scss" />
<style>
.app-wrapper {
position: relative;
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div id="root" class="app-wrapper"></div>
<script src="./mod.js"></script>
<script type="text/javascript">
var _hmt = _hmt || [];
<head>
<meta charset="UTF-8" />
<title>amis - 低代码前端框架</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="image/x-icon" rel="shortcut icon" href="./static/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<link rel="stylesheet" href="./static/iconfont.css" />
<link rel="stylesheet" href="font-awesome/css/font-awesome.css" />
<link rel="stylesheet" href="bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="animate.css/animate.css" />
<link rel="stylesheet" href="prismjs/themes/prism.css" />
<!--DEPENDENCIES_INJECT_PLACEHOLDER-->
<link rel="stylesheet" href="./doc.css" />
<link rel="stylesheet" title="default" href="../scss/themes/default.scss" />
<link rel="stylesheet" title="cxd" disabled href="../scss/themes/cxd.scss" />
<link rel="stylesheet" title="dark" disabled href="../scss/themes/dark.scss" />
// 百度统计
(function () {
var hm = document.createElement('script');
hm.src = 'https://hm.baidu.com/hm.js?1f80f2c9dbe21dc3af239cf9eee90f1f';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(hm, s);
})();
<link rel="stylesheet" href="../scss/utilities.scss" />
<link rel="stylesheet" href="./style.scss" />
<style>
.app-wrapper {
position: relative;
width: 100%;
height: 100%;
}
</style>
</head>
/* @require ./index.jsx 标记为同步依赖,提前加载 */
amis.require(['./index.jsx'], function (app) {
var initialState = {};
app.bootstrap(document.getElementById('root'), initialState);
});
</script>
</body>
</html>
<body>
<div id="root" class="app-wrapper"></div>
<script src="./mod.js"></script>
<script type="text/javascript">
var _hmt = _hmt || [];
// 百度统计
(function () {
var hm = document.createElement('script');
hm.src = 'https://hm.baidu.com/hm.js?1f80f2c9dbe21dc3af239cf9eee90f1f';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(hm, s);
})();
/* @require ./index.jsx 标记为同步依赖,提前加载 */
amis.require(['./index.jsx'], function (app) {
var initialState = {};
app.bootstrap(document.getElementById('root'), initialState);
});
</script>
</body>
</html>

View File

@ -13,9 +13,9 @@ body {
}
}
a {
text-decoration: none !important;
}
// a {
// text-decoration: none !important;
// }
.page-play,
.page-edit {
@ -200,10 +200,13 @@ a {
color: #333;
padding: 0px 22px;
font-weight: 500;
text-decoration: none;
&:hover,
&.is-active {
color: #108cee;
position: relative;
text-decoration: none;
&::before {
content: '';

View File

@ -5,6 +5,7 @@ const path = require('path');
const fs = require('fs');
const package = require('./package.json');
const parserMarkdown = require('./scripts/md-parser');
const parserCodeMarkdown = require('./scripts/code-md-parser');
fis.get('project.ignore').push('public/**', 'npm/**', 'gh-pages/**');
// 配置只编译哪些文件。
@ -31,7 +32,8 @@ Resource.extend({
fis.set('project.files', [
'schema.json',
'scss/**.scss',
'/scss/utilities.scss',
'/scss/themes/*.scss',
'/examples/*.html',
'/examples/*.tpl',
'/examples/static/*.png',
@ -81,7 +83,9 @@ fis.match('/src/icons/**.svg', {
});
fis.match('_*.scss', {
release: false
parser: parserCodeMarkdown,
isMod: true,
rExt: '.js'
});
fis.match('/node_modules/**.js', {

View File

@ -1,7 +1,9 @@
rewrite ^\/(?:examples|docs)\/[a-z0-9\-_\/]+$ /examples/index.html
rewrite ^\/(?:examples|docs|style|schema\.json)(?:\/[a-z0-9\-_\/]+)?$ /examples/index.html
rewrite ^\/play$ /examples/index.html
rewrite ^\/edit$ /examples/index.html
rewrite ^\/api\/ /mock/index.js
rewrite ^\/cxd /examples/cxd.html
rewrite ^\/cxd /examples/cxd.html
redirect ^\/$ /docs/index

View File

@ -112,7 +112,7 @@
"@types/react-json-tree": "^0.6.6",
"@types/react-onclickoutside": "^6.0.2",
"@types/react-overlays": "^0.8.4",
"@types/react-router": "^4.0.16",
"@types/react-router": "^3.0.24",
"@types/react-select": "^1.0.59",
"@types/react-test-renderer": "^16.8.1",
"@types/react-transition-group": "^2.0.6",

11
scripts/code-md-parser.js Normal file
View File

@ -0,0 +1,11 @@
const parserMarkdown = require('./md-parser');
module.exports = function (content, file) {
const markdowns = [];
content.replace(/\/\*\!markdown\n([\s\S]+?)\*\//g, function (_, md) {
markdowns.push(md.trim());
});
return parserMarkdown(markdowns.join('\n\n'), file);
};

View File

@ -153,7 +153,7 @@ module.exports = function (content, file) {
// placeholder[index] = `<iframe class="doc-iframe" width="100%" height="${setting.height || 200}px" frameBorder="0" src="/play?code=${encodeURIComponent(code)}&scope=${encodeURIComponent(setting.scope)}"></iframe>`;
if (lang === 'html') {
if (~code.indexOf('<html')) {
if (~code.indexOf('<html') || ~code.indexOf('<link')) {
return _;
}

File diff suppressed because it is too large Load Diff

View File

@ -96,9 +96,4 @@
@import '../components/form/icon-picker';
@import '../components/form/form';
// js 功能依赖这个
@keyframes apearSensor {
from {
opacity: 0;
}
}
@import '../utilities';

View File

@ -1,4 +0,0 @@
@import './cxd-variables';
@import '../mixins';
@import '../utilities';

View File

@ -1,4 +0,0 @@
@import './dark-variables';
@import '../mixins';
@import '../utilities';

View File

@ -1,4 +0,0 @@
@import './default-variables';
@import '../mixins';
@import '../utilities';

68
scss/utilities.scss Normal file
View File

@ -0,0 +1,68 @@
@import './functions';
@import './variables';
@import './mixins';
// background
@import './utilities/background/background-color';
@import './utilities/border/border-color';
@import './utilities/border/border-radius';
@import './utilities/border/border-width';
@import './utilities/border/border-style';
@import './utilities/layout/box-sizing';
@import './utilities/layout/clear';
@import './utilities/layout/display';
@import './utilities/layout/float';
@import './utilities/layout/overflow';
@import './utilities/layout/position';
@import './utilities/layout/top-right-bottom-left';
@import './utilities/layout/visibility';
@import './utilities/layout/z-index';
@import './utilities/flex/direction';
@import './utilities/flex/flex';
@import './utilities/flex/grow';
@import './utilities/flex/order';
@import './utilities/flex/shrink';
@import './utilities/flex/wrap';
@import './utilities/grid/auto-columns';
@import './utilities/grid/auto-flow';
@import './utilities/grid/auto-rows';
@import './utilities/grid/column-start-end';
@import './utilities/grid/columns';
@import './utilities/grid/gap';
@import './utilities/grid/row-start-end';
@import './utilities/grid/rows';
@import './utilities/box-alignment/align-content';
@import './utilities/box-alignment/align-items';
@import './utilities/box-alignment/align-self';
@import './utilities/box-alignment/justify-content';
@import './utilities/box-alignment/justify-items';
@import './utilities/box-alignment/justify-self';
@import './utilities/box-alignment/place-content';
@import './utilities/box-alignment/place-items';
@import './utilities/box-alignment/place-self';
@import './utilities/effect/box-shadow';
@import './utilities/spacing/margin';
@import './utilities/spacing/padding';
@import './utilities/spacing/space-between';
@import './utilities/sizing/width';
@import './utilities/sizing/height';
@import './utilities/typography/font-size';
@import './utilities/typography/font-style';
@import './utilities/typography/font-weight';
@import './utilities/typography/line-height';
@import './utilities/typography/list-style-type';
@import './utilities/typography/text-align';
@import './utilities/typography/text-color';
@import './utilities/typography/text-decoration';
@import './utilities/typography/text-transform';
@import './utilities/typography/whitespace';
@import './utilities/typography/word-break';

View File

@ -1,9 +1,28 @@
/*!markdown
---
title: 介绍
---
233
*/
@mixin bg-colors-map(
$colors: $colors,
$namePrefix: '',
$prefix: '.',
$suffix: ''
) {
#{$prefix}bg#{$namePrefix}-transparent#{$suffix} {
background-color: transparent;
}
#{$prefix}bg#{$namePrefix}-current#{$suffix} {
background-color: currentColor;
}
@each $name, $color in $colors {
@if (is-map($color)) {
@include bg-colors-map($color, #{'-' + $name}, $prefix, $suffix);
@ -25,11 +44,6 @@
@include bg-colors-map($colors, '', $prefix, $suffix);
}
.no-bg {
background-color: transparent;
color: inherit;
}
@include bg-colors();
@each $deivce in map-keys($devices) {
@include media-device($deivce) {
@ -39,45 +53,5 @@
@include bg-colors('.' + selector-escape('hover:'), ':hover');
@include bg-colors('.' + selector-escape('active:'), '.is-active');
@include bg-colors('.' + selector-escape('disabled:'), '.is-disabled');
@include bg-colors('.group:hover .' + selector-escape('group-hover:'));
// 这是原来的看来是有些 breakchange
// .bg-light {
// @include color-variant($light, 2%, 3%, 3%, 5%);
// color: $text-color;
// }
// .bg-dark {
// @include color-variant($dark, 5%, 10%, 5%, 10%);
// @include font-variant($dark);
// }
// .bg-black {
// @include color-variant($black, 5%, 10%, 5%, 10%);
// @include font-variant($black);
// }
// .bg-primary {
// @include color-variant($primary, 5%, 10%, 5%, 10%);
// @include font-variant($primary);
// }
// .bg-success {
// @include color-variant($success, 5%, 10%, 5%, 10%);
// @include font-variant($success);
// }
// .bg-info {
// @include color-variant($info, 5%, 10%, 5%, 10%);
// @include font-variant($info);
// }
// .bg-warning {
// @include color-variant($warning, 5%, 10%, 5%, 10%);
// @include font-variant($warning);
// }
// .bg-danger {
// @include color-variant($danger, 5%, 10%, 5%, 10%);
// @include font-variant($danger);
// }
// .bg-white {
// @include color-variant($white, 5%, 10%, 5%, 10%);
// color: $text-color;
// }
// .bg-none {
// background: none !important;
// }

View File

@ -28,4 +28,5 @@
@include border-colors('.' + selector-escape('hover:'), ':hover');
@include border-colors('.' + selector-escape('active:'), '.is-active');
@include border-colors('.' + selector-escape('disabled:'), '.is-disabled');
@include border-colors('.group:hover .' + selector-escape('group-hover:'));

View File

@ -46,38 +46,6 @@
}
}
.r {
border-radius: $borderRadius $borderRadius $borderRadius $borderRadius;
}
.r-2x {
border-radius: $borderRadiusMd;
}
.r-3x {
border-radius: $borderRadiusLg;
}
.r-l {
border-radius: $borderRadius 0 0 $borderRadius;
}
.r-r {
border-radius: 0 $borderRadius $borderRadius 0;
}
.r-t {
border-radius: $borderRadius $borderRadius 0 0;
}
.r-b {
border-radius: 0 0 $borderRadius $borderRadius;
}
.no-radius {
border-radius: 0;
}
@include border-radius();
@each $deivce in map-keys($devices) {
@include media-device($deivce) {
@ -87,4 +55,5 @@
// @include border-radius('.' + selector-escape('hover:'), ':hover');
// @include border-radius('.' + selector-escape('active:'), '.is-active');
// @include border-radius('.' + selector-escape('disabled:'), '.is-disabled');
// @include border-radius('.group:hover .' + selector-escape('group-hover:'));

View File

@ -21,176 +21,6 @@
}
}
.b {
border: 1px solid rgba(0, 0, 0, 0.05);
}
.b-a {
border: 1px solid $borderColor;
}
.b-t {
border-top: 1px solid $borderColor;
}
.b-t-none {
border-top-width: 0;
}
.b-r {
border-right: 1px solid $borderColor;
}
.b-r-none {
border-right-width: 0;
}
.b-b {
border-bottom: 1px solid $borderColor;
}
.b-b-none {
border-bottom-width: 0;
}
.b-l {
border-left: 1px solid $borderColor;
}
.b-l-none {
border-left-width: 0;
}
.b-light {
border-color: $light;
}
.b-dark {
border-color: $dark;
}
.b-black {
border-color: $dark;
}
.b-primary {
border-color: $primary;
}
.b-success {
border-color: $success;
}
.b-info {
border-color: $info;
}
.b-warning {
border-color: $warning;
}
.b-danger {
border-color: $danger;
}
.b-white {
border-color: #fff;
}
.b-dashed {
border-style: dashed !important;
}
.b-l-light {
border-left-color: $light;
}
.b-l-dark {
border-left-color: $dark;
}
.b-l-black {
border-left-color: $dark;
}
.b-l-primary {
border-left-color: $primary;
}
.b-l-success {
border-left-color: $success;
}
.b-l-info {
border-left-color: $info;
}
.b-l-warning {
border-left-color: $warning;
}
.b-l-danger {
border-left-color: $danger;
}
.b-l-white {
border-left-color: #fff;
}
.b-l-2x {
border-left-width: 2px;
}
.b-l-3x {
border-left-width: 3px;
}
.b-l-4x {
border-left-width: 4px;
}
.b-l-5x {
border-left-width: 5px;
}
.b-2x {
border-width: 2px;
}
.b-3x {
border-width: 3px;
}
.b-4x {
border-width: 4px;
}
.b-5x {
border-width: 5px;
}
.no-border,
.no-borders {
border-color: transparent;
border-width: 0;
}
.no-b-t {
border-top-width: 0;
}
.no-b-r {
border-right-width: 0;
}
.no-b-b {
border-bottom-width: 0;
}
.no-b-l {
border-left-width: 0;
}
@include border-widths();
@each $deivce in map-keys($devices) {
@include media-device($deivce) {
@ -200,4 +30,5 @@
// @include border-radius('.' + selector-escape('hover:'), ':hover');
// @include border-radius('.' + selector-escape('active:'), '.is-active');
// @include border-radius('.' + selector-escape('disabled:'), '.is-disabled');
// @include border-radius('.group:hover .' + selector-escape('group-hover:'));

View File

@ -6,24 +6,6 @@
}
}
.box-shadow {
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(0, 0, 0, 0.05);
}
.box-shadow-lg {
box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.05);
}
.text-shadow {
font-size: 170px;
text-shadow: 0 1px 0 $borderColor, 0 2px 0 lighten($borderColor, 10%),
0 5px 10px rgba(0, 0, 0, 0.125), 0 10px 20px rgba(0, 0, 0, 0.2);
}
.no-shadow {
box-shadow: none !important;
}
@include make-box-shadow();
@each $deivce in map-keys($devices) {
@include media-device($deivce) {
@ -33,4 +15,5 @@
@include make-box-shadow('.' + selector-escape('hover:'), ':hover');
@include make-box-shadow('.' + selector-escape('active:'), '.is-active');
@include make-box-shadow('.' + selector-escape('disabled:'), '.is-disabled');
@include make-box-shadow('.group:hover .' + selector-escape('group-hover:'));

View File

@ -34,4 +34,5 @@
// @include border-radius('.' + selector-escape('hover:'), ':hover');
// @include border-radius('.' + selector-escape('active:'), '.is-active');
// @include border-radius('.' + selector-escape('disabled:'), '.is-disabled');
// @include border-radius('.group:hover .' + selector-escape('group-hover:'));

View File

@ -7,11 +7,6 @@
}
}
.no-grow {
flex-grow: unset !important;
flex-basis: unset !important;
}
@include make-flex-grow();
@each $deivce in map-keys($devices) {
@include media-device($deivce) {

View File

@ -16,15 +16,6 @@
}
}
.clear {
display: block;
overflow: hidden;
}
.clearfix {
@include clearfix();
}
@include make-clear();
@each $deivce in map-keys($devices) {
@include media-device($deivce) {

View File

@ -29,10 +29,6 @@
}
}
.show {
visibility: visible;
}
@include make-display();
@each $deivce in map-keys($devices) {
@include media-device($deivce) {

View File

@ -37,20 +37,6 @@
}
}
.scroll-x,
.scroll-y {
overflow: hidden;
-webkit-overflow-scrolling: touch;
}
.scroll-y {
overflow-y: auto;
}
.scroll-x {
overflow-x: auto;
}
@include make-overflow();
@each $deivce in map-keys($devices) {
@include media-device($deivce) {

View File

@ -13,22 +13,6 @@
display: $value;
}
}
#{$prefix}pos-rlt {
position: relative;
}
#{$prefix}pos-stc {
position: static !important;
}
#{$prefix}pos-abt {
position: absolute;
}
#{$prefix}pos-fix {
position: fixed;
}
}
@include make-position();

View File

@ -4,12 +4,6 @@
}
#{$prefix}invisible {
position: absolute !important;
clip: rect(1px 1px 1px 1px);
clip: rect(1px, 1px, 1px, 1px);
}
#{$prefix}invisible2 {
visibility: hidden;
}
}

View File

@ -53,111 +53,3 @@
@include make-widths('.' + selector-escape($deivce + ':'));
}
}
// .w-1x {
// width: 1em;
// }
// .w-2x {
// width: 2em;
// }
// .w-3x {
// width: 3em;
// }
// .w-xxs {
// width: 60px;
// }
// .h-xxs {
// height: 60px;
// }
// .w-xs {
// width: 90px;
// }
// .h-xs {
// height: 90px;
// }
// .w-ssm {
// width: 120px;
// }
// .w-sm {
// width: 150px;
// }
// .h-sm {
// height: 150px;
// }
// .h-ssm {
// height: 120px;
// }
// .w {
// width: 200px;
// }
// .h {
// height: 200px;
// }
// .w-md {
// width: 240px;
// }
// .h-md {
// height: 240px;
// }
// .w-lg {
// width: 280px;
// }
// .h-lg {
// height: 280px;
// }
// .w-xl {
// width: 320px;
// }
// .h-xl {
// height: 320px;
// }
// .w-xxl {
// width: 360px;
// }
// .h-xxl {
// height: 360px;
// }
// .w-xxxl {
// width: 420px;
// }
// .h-xxxl {
// height: 420px;
// }
// .w-full {
// width: 100%;
// }
// .w-auto {
// width: auto;
// }
// .h-auto {
// height: auto;
// }
// .h-full {
// height: 100%;
// }

View File

@ -10,6 +10,9 @@
}
}
}
#{$prefix}m-auto#{$suffix} {
margin: auto;
}
}
@mixin margin-negative-spacing($spacing: $spacing, $prefix: '.', $suffix: '') {
@ -40,6 +43,11 @@
}
}
}
#{$prefix}m-x-auto#{$suffix} {
margin-left: auto;
margin-right: auto;
}
}
@mixin margin-negative-x-spacing(
@ -76,6 +84,11 @@
}
}
}
#{$prefix}m-y-auto#{$suffix} {
margin-top: auto;
margin-bottom: auto;
}
}
@mixin margin-negative-y-spacing(
@ -243,25 +256,6 @@
@include margin-negative-left-spacing($spacing, $prefix, $suffix);
}
.pull-in {
margin-left: -15px;
margin-right: -15px;
}
.pull-in-md {
margin-left: -20px;
margin-right: -20px;
}
.pull-in-sm {
margin-left: -10px;
margin-right: -10px;
}
.pull-out {
margin: -10px -15px;
}
@include make-margins();
@each $deivce in map-keys($devices) {
@include media-device($deivce) {
@ -271,305 +265,5 @@
// @include bg-colors('.' + selector-escape('hover:'), ':hover');
// @include bg-colors('.' + selector-escape('active:'), '.is-active');
// @include bg-colors('.' + selector-escape('disabled:'), '.is-disabled');
// @include bg-colors('.group:hover .' + selector-escape('group-hover:'));
// .m-xxs {
// margin: 2px 4px;
// }
// .m-xs {
// margin: 5px;
// }
// .m-sm {
// margin: 10px;
// }
// .m {
// margin: 15px;
// }
// .m-md {
// margin: 20px;
// }
// .m-lg {
// margin: 30px;
// }
// .m-xl {
// margin: 50px;
// }
// .m-n,
// .m-none {
// margin: 0 !important;
// }
// .m-l-none {
// margin-left: 0 !important;
// }
// .m-l-xs {
// margin-left: 5px;
// }
// .m-l-sm {
// margin-left: 10px;
// }
// .m-l {
// margin-left: 15px;
// }
// .m-l-md {
// margin-left: 20px;
// }
// .m-l-lg {
// margin-left: 30px;
// }
// .m-l-xl {
// margin-left: 40px;
// }
// .m-l-xxl {
// margin-left: 50px;
// }
// .m-l-n-xxs {
// margin-left: -1px;
// }
// .m-l-n-xs {
// margin-left: -5px;
// }
// .m-l-n-sm {
// margin-left: -10px;
// }
// .m-l-n {
// margin-left: -15px;
// }
// .m-l-n-md {
// margin-left: -20px;
// }
// .m-l-n-lg {
// margin-left: -30px;
// }
// .m-l-n-xl {
// margin-left: -40px;
// }
// .m-l-n-xxl {
// margin-left: -50px;
// }
// .m-t-none {
// margin-top: 0 !important;
// }
// .m-t-xxs {
// margin-top: 1px;
// }
// .m-t-xs {
// margin-top: 5px;
// }
// .m-t-sm {
// margin-top: 10px;
// }
// .m-t {
// margin-top: 15px;
// }
// .m-t-md {
// margin-top: 20px;
// }
// .m-t-lg {
// margin-top: 30px;
// }
// .m-t-xl {
// margin-top: 40px;
// }
// .m-t-xxl {
// margin-top: 50px;
// }
// .m-t-n-xxs {
// margin-top: -1px;
// }
// .m-t-n-xs {
// margin-top: -5px;
// }
// .m-t-n-sm {
// margin-top: -10px;
// }
// .m-t-n {
// margin-top: -15px;
// }
// .m-t-n-md {
// margin-top: -20px;
// }
// .m-t-n-lg {
// margin-top: -30px;
// }
// .m-t-n-xl {
// margin-top: -40px;
// }
// .m-t-n-xxl {
// margin-top: -50px;
// }
// .m-r-none {
// margin-right: 0 !important;
// }
// .m-r-xxs {
// margin-right: 1px;
// }
// .m-r-xs {
// margin-right: 5px;
// }
// .m-r-sm {
// margin-right: 10px;
// }
// .m-r {
// margin-right: 15px;
// }
// .m-r-md {
// margin-right: 20px;
// }
// .m-r-lg {
// margin-right: 30px;
// }
// .m-r-xl {
// margin-right: 40px;
// }
// .m-r-xxl {
// margin-right: 50px;
// }
// .m-r-n-xxs {
// margin-right: -1px;
// }
// .m-r-n-xs {
// margin-right: -5px;
// }
// .m-r-n-sm {
// margin-right: -10px;
// }
// .m-r-n {
// margin-right: -15px;
// }
// .m-r-n-md {
// margin-right: -20px;
// }
// .m-r-n-lg {
// margin-right: -30px;
// }
// .m-r-n-xl {
// margin-right: -40px;
// }
// .m-r-n-xxl {
// margin-right: -50px;
// }
// .m-b-none {
// margin-bottom: 0 !important;
// }
// .m-b-xxs {
// margin-bottom: 1px;
// }
// .m-b-xs {
// margin-bottom: 5px;
// }
// .m-b-sm {
// margin-bottom: 10px;
// }
// .m-b {
// margin-bottom: 15px;
// }
// .m-b-md {
// margin-bottom: 20px;
// }
// .m-b-lg {
// margin-bottom: 30px;
// }
// .m-b-xl {
// margin-bottom: 40px;
// }
// .m-b-xxl {
// margin-bottom: 50px;
// }
// .m-b-n-xxs {
// margin-bottom: -1px;
// }
// .m-b-n-xs {
// margin-bottom: -5px;
// }
// .m-b-n-sm {
// margin-bottom: -10px;
// }
// .m-b-n {
// margin-bottom: -15px;
// }
// .m-b-n-md {
// margin-bottom: -20px;
// }
// .m-b-n-lg {
// margin-bottom: -30px;
// }
// .m-b-n-xl {
// margin-bottom: -40px;
// }
// .m-b-n-xxl {
// margin-bottom: -50px;
// }

View File

@ -110,74 +110,6 @@
@include padding-left-spacing($spacing, $prefix, $suffix);
}
.wrapper-xs {
padding: 5px;
}
.wrapper-sm {
padding: 10px;
}
.wrapper {
padding: 15px;
}
.wrapper-md {
padding: 20px;
}
.wrapper-lg {
padding: 30px;
}
.wrapper-xl {
padding: 50px;
}
.padder-lg {
padding-left: 30px;
padding-right: 30px;
}
.padder-md {
padding-left: 20px;
padding-right: 20px;
}
.padder {
padding-left: 15px;
padding-right: 15px;
}
.padder-v-xs {
padding-top: 5px;
padding-bottom: 5px;
}
.padder-v-sm {
padding-top: 10px;
padding-bottom: 10px;
}
.padder-v {
padding-top: 15px;
padding-bottom: 15px;
}
.padder-v-md {
padding-top: 20px;
padding-bottom: 20px;
}
.padder-v-lg {
padding-top: 30px;
padding-bottom: 30px;
}
.no-padder {
padding: 0 !important;
}
@include make-padding();
@each $deivce in map-keys($devices) {
@include media-device($deivce) {
@ -186,182 +118,5 @@
}
// @include bg-colors('.' + selector-escape('hover:'), ':hover');
// @include bg-colors('.' + selector-escape('active:'), '.is-active');
// @include bg-colors('.' + selector-escape('disabled:'), '.is-disabled');
// @include bg-colors('.group:hover .' + selector-escape('group-hover:'));
// 以下是原来的
// .p-xxs {
// padding: 2px 4px;
// }
// .p-xs {
// padding: 5px;
// }
// .p-sm {
// padding: 10px;
// }
// .p {
// padding: 15px;
// }
// .p-md {
// padding: 20px;
// }
// .p-lg {
// padding: 30px;
// }
// .p-xl {
// padding: 50px;
// }
// .p-n,
// .p-none {
// padding: 0 !important;
// }
// .p-l-none {
// padding-left: 0 !important;
// }
// .p-l-xs {
// padding-left: 5px;
// }
// .p-l-sm {
// padding-left: 10px;
// }
// .p-l {
// padding-left: 15px;
// }
// .p-l-md {
// padding-left: 20px;
// }
// .p-l-lg {
// padding-left: 30px;
// }
// .p-l-xl {
// padding-left: 40px;
// }
// .p-l-xxl {
// padding-left: 50px;
// }
// .p-t-none {
// padding-top: 0 !important;
// }
// .p-t-xxs {
// padding-top: 1px;
// }
// .p-t-xs {
// padding-top: 5px;
// }
// .p-t-sm {
// padding-top: 10px;
// }
// .p-t {
// padding-top: 15px;
// }
// .p-t-md {
// padding-top: 20px;
// }
// .p-t-lg {
// padding-top: 30px;
// }
// .p-t-xl {
// padding-top: 40px;
// }
// .p-t-xxl {
// padding-top: 50px;
// }
// .p-t-n-xxs {
// padding-top: -1px;
// }
// .p-r-none {
// padding-right: 0 !important;
// }
// .p-r-xxs {
// padding-right: 1px;
// }
// .p-r-xs {
// padding-right: 5px;
// }
// .p-r-sm {
// padding-right: 10px;
// }
// .p-r {
// padding-right: 15px;
// }
// .p-r-md {
// padding-right: 20px;
// }
// .p-r-lg {
// padding-right: 30px;
// }
// .p-r-xl {
// padding-right: 40px;
// }
// .p-r-xxl {
// padding-right: 50px;
// }
// .p-b-none {
// padding-bottom: 0 !important;
// }
// .p-b-xxs {
// padding-bottom: 1px;
// }
// .p-b-xs {
// padding-bottom: 5px;
// }
// .p-b-sm {
// padding-bottom: 10px;
// }
// .p-b {
// padding-bottom: 15px;
// }
// .p-b-md {
// padding-bottom: 20px;
// }
// .p-b-lg {
// padding-bottom: 30px;
// }
// .p-b-xl {
// padding-bottom: 40px;
// }
// .p-b-xxl {
// padding-bottom: 50px;
// }

View File

@ -16,18 +16,6 @@
}
}
.l-s-1x {
letter-spacing: 1;
}
.l-s-2x {
letter-spacing: 2;
}
.l-s-3x {
letter-spacing: 3;
}
@include make-letter-spacing();
@each $deivce in map-keys($devices) {
@include media-device($deivce) {

View File

@ -24,22 +24,6 @@
}
}
.l-h {
line-height: $lineHeightBase;
}
.l-h-0x {
line-height: 0;
}
.l-h-1x {
line-height: 1.2;
}
.l-h-2x {
line-height: 2em;
}
@include make-line-height();
@each $deivce in map-keys($devices) {
@include media-device($deivce) {

View File

@ -9,18 +9,6 @@
}
}
// .text-left {
// text-align: left;
// }
// .text-center {
// text-align: center;
// }
// .text-right {
// text-align: right;
// }
@include make-text-align();
@each $deivce in map-keys($devices) {
@include media-device($deivce) {

View File

@ -41,14 +41,5 @@
@include text-colors('.' + selector-escape('hover:'), ':hover');
@include text-colors('.' + selector-escape('active:'), '.is-active');
@include text-colors('.' + selector-escape('disabled:'), '.is-disabled');
@include text-colors('.group:hover .' + selector-escape('group-hover:'));
// text colors
// @include text-wariant($primary, primary);
// @include text-wariant($info, info);
// @include text-wariant($success, success);
// @include text-wariant($warning, warning);
// @include text-wariant($danger, danger);
// @include text-wariant($dark, dark);
// @include text-wariant($white, white);
// @include text-wariant($black, black);

View File

@ -10,14 +10,6 @@
}
}
.text-l-t {
text-decoration: line-through;
}
.text-u-l {
text-decoration: underline;
}
@include make-text-decoration();
@each $deivce in map-keys($devices) {
@include media-device($deivce) {

View File

@ -14,13 +14,6 @@
}
}
.text-ellipsis {
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
@include make-text-overflow();
@each $deivce in map-keys($devices) {
@include media-device($deivce) {

View File

@ -14,10 +14,6 @@
}
}
.text-u-c {
text-transform: uppercase;
}
@include make-text-transform();
@each $deivce in map-keys($devices) {
@include media-device($deivce) {

View File

@ -16,21 +16,6 @@
}
}
.v-top {
vertical-align: top !important;
align-self: flex-start;
}
.v-middle {
vertical-align: middle !important;
align-self: center;
}
.v-bottom {
vertical-align: bottom !important;
align-self: flex-end;
}
@include make-vertical-align();
@each $deivce in map-keys($devices) {
@include media-device($deivce) {

View File

@ -15,11 +15,6 @@
}
}
.nowrap {
white-space: nowrap;
flex-wrap: nowrap;
}
@include make-whitespace();
@each $deivce in map-keys($devices) {
@include media-device($deivce) {

View File

@ -11,12 +11,6 @@
}
}
.word-break {
white-space: normal;
word-break: break-all;
word-wrap: break-word;
}
@include make-word-break();
@each $deivce in map-keys($devices) {
@include media-device($deivce) {

View File

@ -1,70 +0,0 @@
.avatar {
position: relative;
display: block;
border-radius: 500px;
white-space: nowrap;
& img {
border-radius: 500px;
width: 100%;
}
& i {
position: absolute;
left: 0;
top: 0;
width: 10px;
height: 10px;
margin: 2px;
border-width: 2px;
border-style: solid;
border-radius: 100%;
&.right {
left: auto;
right: 0;
}
&.bottom {
left: auto;
top: auto;
bottom: 0;
right: 0;
}
&.left {
top: auto;
bottom: 0;
}
&.on {
background-color: $success;
}
&.off {
background-color: $text--muted-color;
}
&.busy {
background-color: $danger;
}
&.away {
background-color: $warning;
}
}
&.thumb-md i {
width: 12px;
height: 12px;
margin: 3px;
}
&.thumb-sm i {
margin: 1px;
}
&.thumb-xs i {
margin: 0;
}
}

View File

@ -1,14 +0,0 @@
.hbox {
display: table;
table-layout: fixed;
border-spacing: 0;
width: 100%;
height: 100%;
& > .col {
display: table-cell;
vertical-align: top;
height: 100%;
float: none;
}
}

View File

@ -1,62 +0,0 @@
//
// Labels
// --------------------------------------------------
.label {
display: inline;
padding: 0.2em 0.6em 0.3em;
font-size: 75%;
font-weight: 700;
line-height: 1;
color: $label-color;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: 0.25em;
// Empty labels collapse automatically (not available in IE8)
&:empty {
display: none;
}
// Quick fix for labels in buttons
.btn & {
position: relative;
top: -1px;
}
}
a.label {
&:hover,
&:focus {
color: $label-link--hover-color;
text-decoration: none;
cursor: pointer;
}
}
// Colors
// Contextual variations (linked labels get darker on :hover)
.label-default {
@include label-variant($label--default-bg);
}
.label-primary {
@include label-variant($label--primary-bg);
}
.label-success {
@include label-variant($label--success-bg);
}
.label-info {
@include label-variant($label--info-bg);
}
.label-warning {
@include label-variant($label--warning-bg);
}
.label-danger {
@include label-variant($label--danger-bg);
}

View File

@ -1,26 +0,0 @@
.line {
// width: 100%; 不要设置 100% 否则跟 pull-in 配合使用时候宽度为不对
height: 2px;
margin: 10px 0;
font-size: 0;
overflow: hidden;
}
.line-xs {
margin: 0;
}
.line-lg {
margin-top: 15px;
margin-bottom: 15px;
}
.line-dashed {
border-style: dashed !important;
background-color: transparent;
border-width: 0;
}
.no-line {
border-width: 0;
}

View File

@ -1,30 +0,0 @@
.scrollable {
overflow-x: hidden;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
&.hover {
&,
& > .cell-inner {
overflow-y: hidden !important;
}
&:hover,
&:focus,
&:active {
overflow: visible;
overflow-y: auto;
& > .cell-inner {
overflow-y: auto !important;
}
}
}
.smart & {
&,
& > .cell-inner {
overflow-y: auto !important;
}
}
}

View File

@ -1,54 +0,0 @@
.thumb-xl {
width: 128px;
display: inline-block;
}
.thumb-lg {
width: 96px;
display: inline-block;
}
.thumb-md {
width: 64px;
display: inline-block;
}
.thumb {
width: 50px;
display: inline-block;
}
.thumb-sm {
width: 40px;
display: inline-block;
}
.thumb-xs {
width: 34px;
display: inline-block;
}
.thumb-xxs {
width: 30px;
display: inline-block;
}
.thumb-wrapper {
padding: 2px;
border: 1px solid $borderColor;
}
.thumb,
.thumb-xxs,
.thumb-xs,
.thumb-sm,
.thumb-md,
.thumb-lg,
.thumb-btn,
.thumb-xl {
& img {
height: auto;
max-width: 100%;
vertical-align: middle;
}
}

View File

@ -1,38 +0,0 @@
.vbox {
display: table;
border-spacing: 0;
position: relative;
width: 100%;
height: 100%;
min-height: 240px;
& .row-row {
display: table-row;
height: 100%;
& .cell {
position: relative;
height: 100%;
width: 100%;
.ie & {
display: table-cell;
overflow: auto;
& .cell-inner {
overflow: visible !important;
}
}
& .cell-inner {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
-webkit-overflow-scrolling: touch;
overflow: auto;
}
}
}
}