Add simple lesshint support

This commit is contained in:
afc163 2015-11-26 19:32:55 +08:00
parent 8a1736c1d0
commit 8d36dc6fe5
47 changed files with 293 additions and 197 deletions

12
.lesshintrc Normal file
View File

@ -0,0 +1,12 @@
{
"propertyOrdering": false,
"hexLength": "short",
"stringQuotes": false,
"decimalZero": false,
"importantRule": false,
"zeroUnit": "no_unit",
"qualifyingElement": false,
"duplicateProperty": false,
"importPath": false,
"finalNewline": false
}

View File

@ -84,6 +84,7 @@
"eslint": "^1.1.0",
"eslint-config-airbnb": "^1.0.0",
"eslint-plugin-babel": "^2.1.1",
"eslint-plugin-markdown": "git+https://github.com/ant-design/eslint-plugin-markdown.git",
"eslint-plugin-react": "^3.3.1",
"expect.js": "~0.3.1",
"extract-text-webpack-plugin": "^0.9.1",
@ -93,6 +94,7 @@
"json-loader": "^0.5.1",
"less": "~2.5.3",
"less-loader": "^2.2.0",
"lesshint": "git+https://github.com/ant-design/lesshint.git",
"lodash": "^3.10.0",
"nico-jsx": "~0.6.0",
"pre-commit": "1.x",
@ -100,7 +102,6 @@
"react-addons-test-utils": "~0.14.2",
"react-dom": "~0.14.2",
"react-router": "~1.0.0",
"eslint-plugin-markdown": "git+https://github.com/ant-design/eslint-plugin-markdown.git",
"webpack": "^1.10.1",
"webpack-babel-jest": "^1.0.0",
"webpack-dev-middleware": "^1.2.0"
@ -111,8 +112,9 @@
"clean": "rm -rf _site dist",
"deploy": "rm -rf node_modules && node scripts/install.js && npm run just-deploy",
"just-deploy": "npm run clean && webpack --config webpack.deploy.config.js && webpack --config webpack.antd.config.js && NODE_ENV=PRODUCTION nico build && node scripts/deploy.js",
"lint": "eslint components test index.js --ext '.js,.jsx' && npm run mdlint",
"lint": "eslint components test index.js --ext '.js,.jsx' && npm run mdlint && npm run lesshint",
"mdlint": "eslint components/*/demo/*.md --ext '.md' --global 'React,ReactDOM' --rule 'no-console: 0'",
"lesshint": "lesshint style/ -e 'style/+(core|mixins)/+(base|iconfont|normalize|layouts|compatibility|grid).less'",
"test": "npm run lint && webpack && npm run jest",
"jest": "jest",
"pub": "sh ./scripts/publish.sh",

View File

@ -55,7 +55,8 @@
}
}
&-close-icon, &-with-description-close-icon {
&-close-icon,
&-with-description-close-icon {
font-size: 12px;
position: absolute;
right: 8px;

View File

@ -24,7 +24,8 @@
z-index: 10;
font-family: tahoma;
box-shadow: 0 0 0 1px #fff;
a, a:hover {
a,
a:hover {
color: #fff;
}
}
@ -63,9 +64,9 @@ a .@{badge-prefix-cls} {
}
}
.@{number-prefix-cls}{
.@{number-prefix-cls} {
overflow: hidden;
&-only{
&-only {
display: inline-block;
transition: transform .3s @ease-in-out;
}

View File

@ -34,7 +34,8 @@
.btn-ghost;
}
&-circle, &-circle-outline {
&-circle,
&-circle-outline {
.btn-circle(@btn-prefix-cls);
}
@ -79,7 +80,8 @@
}
// To ensure that a space will be placed between character and `Icon`.
> .@{iconfont-css-prefix} + span, > span + .@{iconfont-css-prefix} {
> .@{iconfont-css-prefix} + span,
> span + .@{iconfont-css-prefix} {
margin-left: 0.5em;
}
}

View File

@ -47,8 +47,10 @@
height: 246px;
}
table, td, th, td {
border: none;
table,
th,
td {
border: 0;
}
td {
@ -150,7 +152,7 @@
}
&-fullscreen {
border-top: none;
border-top: 0;
}
&-fullscreen &-table {

View File

@ -16,9 +16,10 @@
top: 50%;
margin-top: -10px;
padding: 0;
border: none;
border: 0;
outline: none;
&:hover, &:focus {
&:hover,
&:focus {
outline: none;
background: transparent;
color: transparent;
@ -79,7 +80,8 @@
color: transparent;
padding: 5px;
cursor: pointer;
&:hover, &:focus {
&:hover,
&:focus {
outline: none;
&:before {
opacity: 1;

View File

@ -1,12 +1,10 @@
@collapse-prefix-cls: ant-collapse;
#arrow {
.close() {
.iconfont-size-under-12px(7px, 270deg);
}
.open() {
.iconfont-size-under-12px(7px, 360deg);
}
.collapse-close() {
.iconfont-size-under-12px(7px, 270deg);
}
.collapse-open() {
.iconfont-size-under-12px(7px, 360deg);
}
.@{collapse-prefix-cls} {
@ -17,7 +15,7 @@
& > &-item {
border-top: 1px solid #d9d9d9;
&:first-child {
border-top: none;
border-top: 0;
}
> .@{collapse-prefix-cls}-header {
@ -29,7 +27,7 @@
position: relative;
.arrow {
#arrow > .close();
.collapse-close();
.iconfont-mixin();
position: absolute;
color: #666;
@ -44,7 +42,7 @@
top: ~"16px \9";
left: ~"0 \9";
&:before {
content:"\e611";
content: "\e611";
}
}
}
@ -80,7 +78,7 @@
& > &-item > &-header[aria-expanded="true"] {
.arrow {
#arrow > .open();
.collapse-open();
}
}
}

View File

@ -115,8 +115,10 @@
width: 100%;
}
table, td, th, td {
border: none;
table,
th,
td {
border: 0;
}
&-calendar-table {
@ -206,7 +208,8 @@
border-bottom-right-radius: 4px;
}
&-last-month-cell &-date, &-next-month-btn-day &-date {
&-last-month-cell &-date,
&-next-month-btn-day &-date {
color: #bbb;
}

View File

@ -57,8 +57,9 @@
}
}
.@{calendar-prefix-cls}-decade-panel-last-century-cell, .@{calendar-prefix-cls}-decade-panel-next-century-cell {
.@{calendar-prefix-cls}-decade-panel-decade{
.@{calendar-prefix-cls}-decade-panel-last-century-cell,
.@{calendar-prefix-cls}-decade-panel-next-century-cell {
.@{calendar-prefix-cls}-decade-panel-decade {
user-select: none;
-webkit-user-select: none;
}

View File

@ -57,8 +57,9 @@
}
}
.@{calendar-prefix-cls}-year-panel-last-decade-cell, .@{calendar-prefix-cls}-year-panel-next-decade-cell {
.@{calendar-prefix-cls}-year-panel-year{
.@{calendar-prefix-cls}-year-panel-last-decade-cell,
.@{calendar-prefix-cls}-year-panel-next-decade-cell {
.@{calendar-prefix-cls}-year-panel-year {
user-select: none;
-webkit-user-select: none;
}

View File

@ -1,7 +1,7 @@
@dialog-prefix-cls: ant-modal;
@import "./dialog/Dialog.less";
@import "./dialog/Mask.less";
@import "./dialog/Dialog";
@import "./dialog/Mask";
.@{dialog-prefix-cls} {
&-header {

View File

@ -25,7 +25,7 @@
&-content {
position: relative;
background-color: #fff;
border: none;
border: 0;
border-radius: @border-radius-base;
background-clip: padding-box;
outline: 0;

View File

@ -86,7 +86,8 @@ input[type="checkbox"] {
}
}
.@{css-prefix}form-text, .@{css-prefix}form-split {
.@{css-prefix}form-text,
.@{css-prefix}form-split {
margin: 0!important;
padding-top: 7px;
padding-bottom: 7px;
@ -243,7 +244,8 @@ form {
}
}
.@{css-prefix}form-horizontal, .@{css-prefix}form-inline {
.@{css-prefix}form-horizontal,
.@{css-prefix}form-inline {
label {
padding-top: 7px;
padding-bottom: 7px;
@ -255,7 +257,10 @@ form {
}
// Validation state
.has-success, .has-warning, .has-error, .is-validating {
.has-success,
.has-warning,
.has-error,
.is-validating {
&.has-feedback:after {
position: absolute;
bottom: 0;
@ -382,36 +387,36 @@ form {
.is-validating {
&.has-feedback:after {
display: inline-block;
.animation(loadingCircle 1s infinite linear );
content:"\e6a1";
.animation(loadingCircle 1s infinite linear);
content: "\e6a1";
}
}
// need there different zoom animation
// otherwise won't trigger anim
@keyframes diffZoomIn1 {
0%{
0% {
transform: scale(0);
}
100%{
100% {
transform: scale(1);
}
}
@keyframes diffZoomIn2 {
0%{
0% {
transform: scale(0);
}
100%{
100% {
transform: scale(1);
}
}
@keyframes diffZoomIn3 {
0%{
0% {
transform: scale(0);
}
100%{
100% {
transform: scale(1);
}
}

View File

@ -3,6 +3,16 @@
@import "../mixins/iconfont";
@import "../mixins/input";
.handler-disabled() {
opacity: 0.72;
color: #ccc !important;
cursor: default;
&:hover {
color: #ccc;
cursor: default;
}
}
.@{input-number-prefix-cls} {
.input();
margin: 0;
@ -12,7 +22,7 @@
height: 28px;
display: inline-block;
vertical-align: middle;
border: 1px solid #D9D9D9;
border: 1px solid #d9d9d9;
border-radius: @border-radius-base;
overflow: hidden;
width: 90px;
@ -36,7 +46,8 @@
}
}
&-handler-up-inner, &-handler-down-inner {
&-handler-up-inner,
&-handler-down-inner {
.iconfont-mixin();
line-height: 12px;
user-select: none;
@ -149,7 +160,7 @@
&-handler-wrap {
float: right;
border-left: 1px solid #D9D9D9;
border-left: 1px solid #d9d9d9;
width: 22px;
height: 28px;
position: relative;
@ -179,7 +190,7 @@
}
&-handler-down {
border-top: 1px solid #D9D9D9;
border-top: 1px solid #d9d9d9;
top: -1px;
cursor: pointer;
&-inner {
@ -194,17 +205,9 @@
}
}
.handler-disabled() {
opacity: 0.72;
color: #ccc !important;
cursor: default;
&:hover {
color: #ccc;
cursor: default;
}
}
&-handler-down-disabled, &-handler-up-disabled, &-disabled {
&-handler-down-disabled,
&-handler-up-disabled,
&-disabled {
.@{input-number-prefix-cls}-handler-down-inner,
.@{input-number-prefix-cls}-handler-up-inner {
.handler-disabled();

View File

@ -35,7 +35,6 @@
transition: all 0.3s ease;
}
&-item-active,
&-submenu-title:hover {
background-color: tint(@primary-color, 90%);
@ -98,7 +97,8 @@
white-space: nowrap;
// Disabled state sets text to gray and nukes hover/tab effects
&.@{menu-prefix-cls}-item-disabled, &.@{menu-prefix-cls}-submenu-disabled {
&.@{menu-prefix-cls}-item-disabled,
&.@{menu-prefix-cls}-submenu-disabled {
color: #999 !important;
}
}
@ -166,7 +166,7 @@
}
&-horizontal {
border: none;
border: 0;
border-bottom: 1px solid #e9e9e9;
box-shadow: none;
z-index: 0;
@ -191,7 +191,8 @@
&:hover {
color: @primary-color;
}
&:before, &:after {
&:before,
&:after {
position: absolute;
background-color: transparent;
width: 20px;
@ -212,8 +213,10 @@
}
}
&-vertical, &-inline {
& > .@{menu-prefix-cls}-item, & > .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title {
&-vertical,
&-inline {
& > .@{menu-prefix-cls}-item,
& > .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title {
padding: 0px 16px 0 28px;
font-size: 12px;
line-height: 42px;
@ -224,7 +227,8 @@
&-vertical&-sub {
padding: 0;
transform-origin: 0 0;
& > .@{menu-prefix-cls}-item, & > .@{menu-prefix-cls}-submenu {
& > .@{menu-prefix-cls}-item,
& > .@{menu-prefix-cls}-submenu {
transform-origin: 0 0;
}
}
@ -236,10 +240,11 @@
&-sub&-inline {
padding: 0;
border: none;
border: 0;
box-shadow: none;
border-radius: 0;
& > .@{menu-prefix-cls}-item, & > .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title {
& > .@{menu-prefix-cls}-item,
& > .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title {
line-height: 42px;
height: 42px;
list-style-type: disc;

View File

@ -34,7 +34,7 @@
}
&-info.anticon,
&-loading.anticon {
&-loading.anticon {
color: @primary-color;
}

View File

@ -90,13 +90,14 @@
}
}
.notification-fade-effect() {
.notification-fade-effect {
animation-duration: 0.3s;
animation-fill-mode: both;
animation-timing-function: @ease-in-out;
}
&-fade-enter,&-fade-appear {
&-fade-enter,
&-fade-appear {
opacity: 0;
.notification-fade-effect();
animation-play-state: paused;
@ -107,7 +108,8 @@
animation-play-state: paused;
}
&-fade-enter&-fade-enter-active, &-fade-appear&-fade-appear-active {
&-fade-enter&-fade-enter-active,
&-fade-appear&-fade-appear-active {
animation-name: NotificationFadeIn;
animation-play-state: running;
}
@ -116,32 +118,32 @@
animation-name: NotificationFadeOut;
animation-play-state: running;
}
}
@keyframes NotificationFadeIn {
0% {
opacity: 0;
left: @notice-width;
}
100% {
left: 0;
opacity: 1;
}
@keyframes NotificationFadeIn {
0% {
opacity: 0;
left: @notice-width;
}
@keyframes NotificationFadeOut {
0% {
opacity: 1;
margin-bottom: @notice-margin-bottom;
padding-top: @notice-padding;
padding-bottom: @notice-padding;
max-height: 150px;
}
100% {
opacity: 0;
margin-bottom: 0;
padding-top: 0;
padding-bottom: 0;
max-height: 0;
}
100% {
left: 0;
opacity: 1;
}
}
@keyframes NotificationFadeOut {
0% {
opacity: 1;
margin-bottom: @notice-margin-bottom;
padding-top: @notice-padding;
padding-bottom: @notice-padding;
max-height: 150px;
}
100% {
opacity: 0;
margin-bottom: 0;
padding-top: 0;
padding-bottom: 0;
max-height: 0;
}
}

View File

@ -52,8 +52,8 @@
}
}
&-jump-prev, &-jump-next {
&-jump-prev,
&-jump-next {
&:after {
content: "•••";
display: block;
@ -89,10 +89,15 @@
}
}
&-prev, &-jump-prev, &-jump-next {
&-prev,
&-jump-prev,
&-jump-next {
margin-right: 8px;
}
&-prev, &-next, &-jump-prev, &-jump-next {
&-prev,
&-next,
&-jump-prev,
&-jump-next {
font-family: Arial;
cursor: pointer;
color: #666;
@ -107,7 +112,8 @@
display: inline-block;
}
&-prev, &-next {
&-prev,
&-next {
border: 1px solid #d9d9d9;
a {
@ -192,8 +198,9 @@
}
}
&-simple &-prev, &-simple &-next {
border: none;
&-simple &-prev,
&-simple &-next {
border: 0;
height: 24px;
line-height: 24px;
margin: 0;
@ -227,7 +234,7 @@
.@{pagination-prefix-cls} {
&.mini &-item {
border: none;
border: 0;
margin: 0;
min-width: 20px;
height: 20px;
@ -240,7 +247,7 @@
min-width: 20px;
height: 20px;
line-height: 20px;
border: none;
border: 0;
a {
&:after {
@ -250,7 +257,8 @@
}
}
&.mini &-jump-prev, &.mini &-jump-next {
&.mini &-jump-prev,
&.mini &-jump-next {
height: 20px;
line-height: 20px;
}

View File

@ -52,22 +52,30 @@
}
// Offset the popover to account for the popover arrow
&-placement-top, &-placement-topLeft, &-placement-topRight {
&-placement-top,
&-placement-topLeft,
&-placement-topRight {
margin-top: -@popover-arrow-width;
padding-bottom: @popover-distance;
}
&-placement-right, &-placement-rightTop, &-placement-rightBottom {
&-placement-right,
&-placement-rightTop,
&-placement-rightBottom {
margin-left: @popover-arrow-width;
padding-left: @popover-distance;
}
&-placement-bottom, &-placement-bottomLeft, &-placement-bottomRight {
&-placement-bottom,
&-placement-bottomLeft,
&-placement-bottomRight {
margin-top: @popover-arrow-width;
padding-top: @popover-distance;
}
&-placement-left, &-placement-leftTop, &-placement-leftBottom {
&-placement-left,
&-placement-leftTop,
&-placement-leftBottom {
margin-left: -@popover-arrow-width;
padding-right: @popover-distance;
}

View File

@ -21,7 +21,7 @@
&-line-inner {
display: inline-block;
width: 100%;
background-color: #E9E9E9;
background-color: #e9e9e9;
border-radius: 100px;
}
&-line-bg {

View File

@ -215,7 +215,7 @@
&-disabled.@{radio-prefix-cls}-button-checked {
color: #fff;
background-color: #ccc;
box-shadow: -1px 0px 0px 0px #CCC;
box-shadow: -1px 0px 0px 0px #ccc;
border-color: #ccc;
}
}

View File

@ -21,7 +21,7 @@
right: -1px;
padding-right: 14px;
color: @primary-color;
transform: scale(0.75)
transform: scale(0.75);
}
}
@ -86,7 +86,8 @@
}
&-disabled &-selection {
&:hover, &:active {
&:hover,
&:active {
border-color: #d9d9d9;
}
}
@ -190,7 +191,7 @@
}
.@{select-prefix-cls}-search__field {
border: none;
border: 0;
font-size: 100%;
background: transparent;
outline: 0;
@ -407,7 +408,8 @@
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
}
&:hover, &-active {
&:hover,
&-active {
background-color: tint(@primary-color, 90%) !important;
}
@ -433,7 +435,8 @@
}
}
&-container-open, &-open {
&-container-open,
&-open {
.@{select-prefix-cls}-dropdown {
display: block;
}

View File

@ -126,13 +126,15 @@
background-color: @slider-disabled-color !important;
}
.@{slider-prefix-cls}-handle, .@{slider-prefix-cls}-dot {
.@{slider-prefix-cls}-handle,
.@{slider-prefix-cls}-dot {
border-color: @slider-disabled-color!important;
background-color: #fff;
cursor: not-allowed;
}
.@{slider-prefix-cls}-mark-text, .@{slider-prefix-cls}-dot {
.@{slider-prefix-cls}-mark-text,
.@{slider-prefix-cls}-dot {
cursor: not-allowed!important;
}
}

View File

@ -83,8 +83,14 @@
// pulse
@keyframes antSpinPulse {
0%, 80%, 100% { opacity: 0; }
40% { opacity: 1; }
0%,
80%,
100% {
opacity: 0;
}
40% {
opacity: 1;
}
}
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {

View File

@ -104,7 +104,8 @@
}
}
.@{steps-prefix-cls}-head, .@{steps-prefix-cls}-main {
.@{steps-prefix-cls}-head,
.@{steps-prefix-cls}-main {
position: relative;
display: inline-block;
vertical-align: top;
@ -222,7 +223,8 @@
}
}
&.@{steps-prefix-cls}-small .@{steps-prefix-cls}-item.@{steps-prefix-cls}-custom .@{steps-prefix-cls}-head-inner, .@{steps-prefix-cls}-item.@{steps-prefix-cls}-custom .@{steps-prefix-cls}-head-inner {
&.@{steps-prefix-cls}-small .@{steps-prefix-cls}-item.@{steps-prefix-cls}-custom .@{steps-prefix-cls}-head-inner,
.@{steps-prefix-cls}-item.@{steps-prefix-cls}-custom .@{steps-prefix-cls}-head-inner {
width: inherit;
height: inherit;
line-height: inherit;

View File

@ -2,7 +2,7 @@
@switch-duration:.3s;
.@{switch-prefix-cls}{
.@{switch-prefix-cls} {
position: relative;
display: inline-block;
box-sizing: border-box;
@ -18,18 +18,18 @@
user-select: none;
&-inner {
color:#fff;
color: #fff;
font-size: 12px;
position: absolute;
left: 24px;
}
&:after{
&:after {
position: absolute;
width: 18px;
height: 18px;
left: 2px;
top:1px;
top: 1px;
border-radius: 100%;
background-color: #fff;
content: " ";
@ -37,37 +37,31 @@
transition: left @switch-duration @ease-in-out-circ;
}
&:hover:after{
}
&-checked{
&-checked {
border: 1px solid @primary-color;
background-color: @primary-color;
.@{switch-prefix-cls}-inner {
left:6px;
left: 6px;
}
&:after{
&:after {
left: 22px;
}
}
&-disabled{
&-disabled {
cursor: no-drop;
background: #f4f4f4;
border-color:#f4f4f4;
border-color: #f4f4f4;
&:after{
&:after {
background: #ccc;
cursor: no-drop;
}
&:hover:after{
}
&-inner {
color:#ccc;
color: #ccc;
}
}
}

View File

@ -64,10 +64,11 @@
}
th.@{table-prefix-cls}-column-sort {
background: #EAEAEA;
background: #eaeaea;
}
th, td {
th,
td {
padding: 16px 8px;
}
@ -156,11 +157,11 @@
&.@{table-prefix-cls}-bordered {
table {
border: 1px solid #E9E9E9;
border: 1px solid #e9e9e9;
}
th {
border-bottom: 1px solid #E9E9E9;
border-bottom: 1px solid #e9e9e9;
}
tr:last-child {
@ -169,8 +170,9 @@
}
}
th, td {
border-right: 1px solid #E9E9E9;
th,
td {
border-right: 1px solid #e9e9e9;
&:last-child {
border-right: 0;
}
@ -192,7 +194,7 @@
text-align: center;
font-size: 12px;
color: #999;
border-bottom: 1px solid #E9E9E9;
border-bottom: 1px solid #e9e9e9;
position: absolute;
top: 50px;
left: 0;
@ -249,7 +251,7 @@
height: 18px;
text-align: center;
line-height: 15px;
border: 1px solid #E9E9E9;
border: 1px solid #e9e9e9;
user-select: none;
background: #fff;
&-cell {
@ -258,15 +260,16 @@
}
&-expanded:after {
content: '-'
content: '-';
}
&-collapsed:after {
content: '+'
content: '+';
}
}
tr&-expanded-row {
&, &:hover {
&,
&:hover {
background: #fbfbfb;
}
}

View File

@ -49,7 +49,8 @@
padding-right: 32px;
}
&-tab-prev, &-tab-next {
&-tab-prev,
&-tab-next {
user-select: none;
z-index: 2;
margin-right: -2px;
@ -58,7 +59,7 @@
height: 100%;
line-height: 32px;
cursor: pointer;
border: none;
border: 0;
background-color: transparent;
position: absolute;
text-align: center;
@ -134,7 +135,8 @@
list-style: none;
float: left;
&:before, &:after {
&:before,
&:after {
display: table;
content: " ";
}
@ -144,7 +146,8 @@
}
div.@{tab-prefix-cls}-tab-active {
> .@{tab-prefix-cls}-tab-inner, > .@{tab-prefix-cls}-tab-inner:hover {
> .@{tab-prefix-cls}-tab-inner,
> .@{tab-prefix-cls}-tab-inner:hover {
color: tint(@primary-color, 20%);
cursor: pointer;
text-decoration: none;

View File

@ -1,6 +1,6 @@
.@{timepicker-prefix-cls}-select {
float: left;
overflow-y:auto;
overflow-y: auto;
font-size: 12px;
border: 1px solid #e9e9e9;
border-width: 0 1px;

View File

@ -38,16 +38,24 @@
display: none;
}
&-placement-top, &-placement-topLeft, &-placement-topRight {
&-placement-top,
&-placement-topLeft,
&-placement-topRight {
padding: @tooltip-arrow-width 0 @tooltip-distance 0;
}
&-placement-right, &-placement-rightTop, &-placement-rightBottom {
&-placement-right,
&-placement-rightTop,
&-placement-rightBottom {
padding: 0 @tooltip-arrow-width 0 @tooltip-distance;
}
&-placement-bottom, &-placement-bottomLeft, &-placement-bottomRight {
&-placement-bottom,
&-placement-bottomLeft,
&-placement-bottomRight {
padding: @tooltip-distance 0 @tooltip-arrow-width 0;
}
&-placement-left, &-placement-leftTop, &-placement-leftBottom {
&-placement-left,
&-placement-leftTop,
&-placement-leftBottom {
padding: 0 @tooltip-distance 0 @tooltip-arrow-width;
}
}

View File

@ -64,7 +64,7 @@
font-family: 'anticon';
font-weight: bold;
.animation(loadingCircle 1s infinite linear);
margin-top:8px;
margin-top: 8px;
}
}
&.@{tree-prefix-cls}-switcher {

View File

@ -1,3 +1,4 @@
//== Typography
//** Headings: h1 h2 h3 h4 h5 h6
//** Headings: h1 h2 h3 h4 h5 h6

View File

@ -7,7 +7,7 @@
width: 100%;
}
input[type=file] {
input[type="file"] {
cursor: pointer;
}
@ -141,18 +141,18 @@
.@{upload-prefix-cls}-margin-top-leave {
animation: uploadMarginTopOut .3s @ease-in-out-circ;
}
}
@keyframes uploadMarginTopIn {
from {
margin-top: -25px;
opacity: 0;
}
}
@keyframes uploadMarginTopOut {
to {
margin-top: -25px;
opacity: 0;
}
@keyframes uploadMarginTopIn {
from {
margin-top: -25px;
opacity: 0;
}
}
@keyframes uploadMarginTopOut {
to {
margin-top: -25px;
opacity: 0;
}
}

View File

@ -25,8 +25,8 @@ body {
// unify the setting of elements's margin and padding for browsers
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td,hr,button,article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section {
margin:0;
padding:0;
margin: 0;
padding: 0;
}
// Reset fonts for relevant elements

View File

@ -2,4 +2,5 @@
@import "color";
@import "iconfont";
@import "layouts";
@import "motion";
@import "motion";

View File

@ -4,7 +4,8 @@
}
.make-motion(@className, @keyframeName) {
.@{className}-enter, .@{className}-appear {
.@{className}-enter,
.@{className}-appear {
.motion-common();
animation-play-state: paused;
}
@ -12,7 +13,8 @@
.motion-common();
animation-play-state: paused;
}
.@{className}-enter.@{className}-enter-active, .@{className}-appear.@{className}-appear-active {
.@{className}-enter.@{className}-enter-active,
.@{className}-appear.@{className}-appear-active {
animation-name: ~"@{keyframeName}In";
animation-play-state: running;
}

View File

@ -1,6 +1,7 @@
.fade-motion(@className, @keyframeName) {
.make-motion(@className, @keyframeName);
.@{className}-enter, .@{className}-appear {
.@{className}-enter,
.@{className}-appear {
opacity: 0;
animation-timing-function: linear;
}

View File

@ -1,6 +1,7 @@
.move-motion(@className, @keyframeName) {
.make-motion(@className, @keyframeName);
.@{className}-enter, .@{className}-appear {
.@{className}-enter,
.@{className}-appear {
opacity: 0;
animation-timing-function: @ease-out-circ;
}

View File

@ -7,4 +7,5 @@
transform-origin: 50% 50%;
transform: rotate(360deg);
}
}
}

View File

@ -1,6 +1,7 @@
.slide-motion(@className, @keyframeName) {
.make-motion(@className, @keyframeName);
.@{className}-enter, .@{className}-appear {
.@{className}-enter,
.@{className}-appear {
opacity: 0;
animation-timing-function: @ease-out-quint;
}

View File

@ -1,9 +1,11 @@
.swing-motion(@className, @keyframeName) {
.@{className}-enter, .@{className}-appear {
.@{className}-enter,
.@{className}-appear {
.motion-common();
animation-play-state: paused;
}
.@{className}-enter.@{className}-enter-active, .@{className}-appear.@{className}-appear-active {
.@{className}-enter.@{className}-enter-active,
.@{className}-appear.@{className}-appear-active {
animation-name: ~"@{keyframeName}In";
animation-play-state: running;
}
@ -12,7 +14,8 @@
.swing-motion(swing, antSwing);
@keyframes antSwingIn {
0%, 100% {
0%,
100% {
transform: translateX(0px);
}
20% {

View File

@ -1,6 +1,7 @@
.zoom-motion(@className, @keyframeName) {
.make-motion(@className, @keyframeName);
.@{className}-enter, .@{className}-appear {
.@{className}-enter,
.@{className}-appear {
transform: scale(0); // need this by yiminghe
animation-timing-function: @ease-out-circ;
}

View File

@ -110,7 +110,7 @@
}
&.disabled,
&[disabled]{
&[disabled] {
cursor: @cursor-disabled;
}

View File

@ -1,5 +1,6 @@
.form-control-validation(@text-color: @input-color; @border-color: @input-border-color; @background-color: @input-bg) {
.@{css-prefix}form-explain, .@{css-prefix}form-split {
.@{css-prefix}form-explain,
.@{css-prefix}form-split {
color: @text-color;
}
// 输入框的不同校验状态

View File

@ -18,7 +18,7 @@
}
// == when hoverd
.hover(@color: @input-hover-border-color ) {
.hover(@color: @input-hover-border-color) {
border-color: tint(@color, 20%);
}

View File

@ -54,7 +54,7 @@
// Prevent browsers from flickering when using CSS 3D transforms.
// Default value is `visible`, but can be changed to `hidden`
.backface-visibility(@visibility){
.backface-visibility(@visibility) {
-webkit-backface-visibility: @visibility;
-moz-backface-visibility: @visibility;
backface-visibility: @visibility;
@ -104,8 +104,14 @@
color: @color;
opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526
}
&:-ms-input-placeholder { color: @color; } // Internet Explorer 10+
&::-webkit-input-placeholder { color: @color; } // Safari and Chrome
// Internet Explorer 10+
&:-ms-input-placeholder {
color: @color;
}
// Safari and Chrome
&::-webkit-input-placeholder {
color: @color;
}
}
// Transformations