UNPKG

uxcore-pickable

Version:

uxcore-pickable component for uxcore.

165 lines (157 loc) 3.52 kB
/** * Pickable Component Style for uxcore * @author onbing * * Copyright 2014-2015, Uxcore Team, Alinw. * All rights reserved. */ @__pickablePrefixCls: kuma-pickable; .@{__pickablePrefixCls} { display: table; } .@{__pickablePrefixCls}-toggle-more { display: table-cell; } .@{__pickablePrefixCls}-toggle-more { width: 56px; padding-left: 16px; color: @brand-link; cursor: pointer; .@{__pickablePrefixCls}-en & { width: 66px; } &-icon { font-size: 12px; margin-left: 4px; transition: transform 0.2s @transition-ease; display: inline-block; line-height: 1; vertical-align: middle; transform-origin: center center; position: relative; transform: rotate(180deg); top: -2px; } &__fold { .@{__pickablePrefixCls}-toggle-more-icon { transform: rotate(0deg); top: 0px; } } } .@{__pickablePrefixCls}-items { &__fold { height: 36px; overflow: hidden; } } .@{__pickablePrefixCls}-item { display: inline-block; height: 28px; padding: 0 12px; min-width: 68px; text-align: center; line-height: 26px; border: 1px solid @border-color; margin-right: 4px; margin-bottom: 8px; border-radius: 3px; cursor: pointer; color: @normal-alpha-3; transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; &:hover { border-color: @border-hover-color; color: @normal-alpha-2; } &:focus, &.active { border-color: @brand-primary; background: @brand-primary; color: white; } &.disabled { background: @bg-disabled-color; color: @text-disabled-color; border-color: @bg-disabled-color; cursor: not-allowed; } .@{__pickablePrefixCls}-item-icon-clear { font-weight: 700; padding-left: 9px; } } .@{__pickablePrefixCls}-item-simple { border: 1px solid transparent; background: white; margin-right: 4px; color: @normal-alpha-2; &:hover { background: white; border-color: transparent; } &.active { border-color: @brand-primary; background: @brand-primary; color: white; .@{__pickablePrefixCls}-item-num { background: transparent; color: white; } } &.disabled { background: white; color: @text-disabled-color; border-color: transparent; cursor: not-allowed; } .@{__pickablePrefixCls}-item-num { background: @basic-400; color: @text-thirdary-color; display: inline-block; min-width: 26px; text-align: center; height: 16px; line-height: 16px; margin-left: 9px; } } .@{__pickablePrefixCls}-item-hook, .@{__pickablePrefixCls}-item-hook-simple { &.multiple-active { padding: 0 12px; } &.active { border-color: @brand-primary-light; background: white; background: linear-gradient(-45deg, transparent 11px, white 0), linear-gradient(45deg, transparent 15px, @brand-primary 0); position: relative; color: @text-primary-color; i.kuma-pickable-item-icon-hook { position: absolute; height: 10px; line-height: 10px; color: white; font-size: 10px; right: 0; bottom: -1px; transform: scale(0.7); &:before { content: "\e6af"; font-family: uxcore !important; } } } } .@{__pickablePrefixCls}-item-hook-simple { border-color: transparent; &:hover { border-color: transparent; } &.active { border-color: @brand-primary-light; } &.disabled { background: transparent; border-color: transparent; } }