/* * utilities */ // background @import './utilities/background/background-color'; @import './utilities/border/border-color'; @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/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-weight'; @import './utilities/typography/line-height'; @import './utilities/typography/text-align'; @import './utilities/typography/text-color'; .clearfix { @include clearfix(); } .show { visibility: visible; } .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; } .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; } .no-radius { border-radius: 0; } .rounded { border-radius: 500px; } .clear { display: block; overflow: hidden; } .no-bg { background-color: transparent; color: inherit; } .no-select { user-select: none; } .l-h { line-height: $lineHeightBase; } .l-h-0x { line-height: 0; } .l-h-1x { line-height: 1.2; } .l-h-2x { line-height: 2em; } .l-s-1x { letter-spacing: 1; } .l-s-2x { letter-spacing: 2; } .l-s-3x { letter-spacing: 3; } .font-normal { font-weight: normal; } .font-thin { font-weight: 300; } .font-bold { font-weight: 700; } .text-ellipsis { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .text-u-c { text-transform: uppercase; } .text-l-t { text-decoration: line-through; } .text-u-l { text-decoration: underline; } .text-left { text-align: left; } .text-center { text-align: center; } .text-right { text-align: right; } .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; } .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; } .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; } .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; } .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; } .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; } } .no-grow { flex-grow: unset !important; flex-basis: unset !important; } .nowrap { white-space: nowrap; flex-wrap: nowrap; } @include media-breakpoint-up(sm) { .#{$ns}Form-col { &.w, &.w-xs, &.w-sm, &.w-md, &.w-lg { flex-basis: unset; flex-grow: unset; } } } .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; } } .img-full { width: 100%; & img { width: 100%; } } .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; } .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; } } } .scroll-x, .scroll-y { overflow: hidden; -webkit-overflow-scrolling: touch; } .scroll-y { overflow-y: auto; } .scroll-x { overflow-x: auto; } .hover-action { display: none; } .hover-rotate { transition: all 0.2s ease-in-out 0.1s; } .hover-anchor:hover, .hover-anchor:focus, .hover-anchor:active { & > .hover-action { display: inherit; } & > .hover-rotate { transform: rotate(90deg); } } .backdrop { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1050; &.fade { opacity: 0; } &.in { opacity: 0.8; } } .col-xs-2-4, .col-sm-2-4, .col-md-2-4, .col-lg-2-4, .col-xs-1-5, .col-sm-1-5, .col-md-1-5, .col-lg-1-5 { position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px; } // 5/12 = 2.4 .col-xs-2-4 { width: 20%; float: left; } // 8 / 12 = 1.5 .col-xs-1-5 { width: 12.5%; float: left; } .invisible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px); } .invisible2 { visibility: hidden; } .hbox { display: table; table-layout: fixed; border-spacing: 0; width: 100%; height: 100%; & > .col { display: table-cell; vertical-align: top; height: 100%; float: none; } } .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; } } } } .word-break { white-space: normal; word-break: break-all; word-wrap: break-word; } // // 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); } // js 功能依赖这个 @keyframes apearSensor { from { opacity: 0; } } @media (min-width: 768px) { .col-sm-2-4 { width: 20%; float: left; } .col-sm-1-5 { width: 12.5%; float: left; } } @media (min-width: 992px) { .col-md-2-4 { width: 20%; float: left; } .col-md-1-5 { width: 12.5%; float: left; } } @media (min-width: 1200px) { .col-lg-2-4 { width: 20%; float: left; } .col-lg-1-5 { width: 12.5%; float: left; } } // sm @media (min-width: 768px) and (max-width: 991px) { .hidden-sm.show { display: inherit !important; } .no-m-sm { margin: 0 !important; } .no-padder-sm { padding: 0 !important; } } .visible-xs { display: none; } /*phone*/ @media (max-width: 767px) { .visible-xs { display: block; } .w-auto-xs { width: auto; } .shift { display: none !important; } .shift.in { display: block !important; } .row-2 [class*='col'] { width: 50%; float: left; } .row-2 .col-0 { clear: none; } .row-2 li:nth-child(odd) { clear: left; margin-left: 0; } .text-center-xs { text-align: center; } .text-left-xs { text-align: left; } .text-right-xs { text-align: right; } .no-border-xs { border-width: 0; } .pull-none-xs { float: none !important; } .pull-right-xs { float: right !important; } .pull-left-xs { float: left !important; } .dropdown-menu.pull-none-xs { left: 0; } .hidden-xs.show { display: inherit !important; } .wrapper-lg, .wrapper-md { padding: 15px; } .padder-lg, .padder-md { padding-left: 15px; padding-right: 15px; } .no-m-xs { margin: 0 !important; } .no-padder-xs { padding: 0 !important; } }