// 颜色定义规范
$color-background = #222
$color-background-d = rgba(0, 0, 0, 0.3)
$color-highlight-background = #333
$color-dialog-background = #666
$color-theme = #ffcd32
$color-theme-d = rgba(255, 205, 49, 0.5)
$color-sub-theme = #d93f30
$color-text = #fff
$color-text-d = rgba(255, 255, 255, 0.3)
$color-text-l = rgba(255, 255, 255, 0.5)
$color-text-ll = rgba(255, 255, 255, 0.8)
//字体定义规范
$font-size-small-s = 10px
$font-size-small = 12px
$font-size-medium = 14px
$font-size-medium-x = 16px
$font-size-large = 18px
$font-size-large-x = 22px
// 背景图片
bg-image($url)
background-image: url($url")
@media (-webkit-min-device-pixel-ratio: 3),(min-device-pixel-ratio: 3)
background-image: url($url)
// 不换行
no-wrap()
text-overflow: ellipsis
overflow: hidden
white-space: nowrap
// 扩展点击区域
extend-click()
position: relative
&:before
content: ''
position: absolute
top: -10px
left: -10px
right: -10px
bottom: -10px
// 圆角
// .border-radius()
// 盒阴影
// .box-shadow()
// .Box-sizing
// Transitions
// .transition()
// .transition-property
// .transition-delay
// .transition-duration
// .transition-timing-function
// .transition-transform
// Transformations
// .rotate .rotateX .rotateY
// .scale
// .translate
// .skew
// .translate3d
// .perspective
// .perspective-origin
// .transform-origin
// Animations
// .animation
// .animation-name
// .animation-duration
// .animation-timing-function
// .animation-delay
// .animation-iteration-count
// .animation-direction
// Opacity
// .opacity
// Placeholder text
// .placeholder
// Columns
// .content-columns
// Clearfix
.clearfix() {
&:before,
&:after {
content: " ";
display: table;
}
&:after {
clear: both;
}
}
// Horizontal centering
.center-block() {
display: block;
margin-left: auto;
margin-right: auto;
}
// Sizing helpers
.size(@width; @height) {
width: @width;
height: @height;
}
.square(@size) {
.size(@size; @size);
}
// Resizable textareas
.resizable(@direction: both) {
// Options: horizontal, vertical, both
resize: @direction;
// Safari fix
overflow: auto;
}
// Truncating text
.text-overflow() {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
console