ORIENT/modules/backend/assets/less/controls/tab.less

414 lines
11 KiB
Plaintext
Raw Normal View History

2014-05-14 13:24:20 +00:00
//
// Tabs control
// - The control supports 3 basic CSS classes: master, primary and secondary.
// --------------------------------------------------
.control-tabs {
position: relative;
margin-bottom: 20px;
&:last-child {
margin-bottom: 0;
}
.horizontal-scroll-indicators(@color-scroll-indicator);
&.scroll-active-before:before {color: @color-tab-active-border;}
&.scroll-active-after:after {color: @color-tab-active-border;}
&:before, &:after {
top: 5px;
margin-top: 0;
}
> ul.nav-tabs, > div > ul.nav-tabs, > div > div > ul.nav-tabs {
white-space: nowrap;
font-size: 0;
overflow: hidden;
border-bottom: none;
> li {
font-size: 15px;
float: none;
display: inline-block;
margin-right: 20px;
position: relative;
&:last-child {
margin-right: 0;
}
a {
border-left: none!important;
border-top: none!important;
border-right: none!important;
padding: 0 0 10px 0;
color: @color-tab-inactive-text;
background: @color-body-bg;
font-weight: 400;
overflow: hidden;
&:hover {
background-color: transparent;
border-bottom-color: transparent;
}
&:before {
font-size: 14px;
}
2014-10-06 05:21:03 +00:00
> span.title > span {
max-width: 150px;
height: 16px;
margin-bottom: -4px;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
}
2014-05-14 13:24:20 +00:00
}
span.tab-close {
display: none;
}
&.active {
a {
color: @color-tab-active-text;
}
&:after {
width: 100%;
height: 3px;
bottom: 0;
background: @color-tab-active-border;
}
}
}
}
> div.tab-content {
> div.tab-pane {
padding: 20px 0 0 0;
.clearfix();
display: none;
&.active {
display: block;
&.layout-cell {
display: table-cell;
}
}
}
}
&[data-closable] {
> ul.nav-tabs, > div > ul.nav-tabs, > div > div > ul.nav-tabs {
> li {
margin-right: 5px;
a {
padding-left: 20px!important;
padding-right: 0!important;
}
span.tab-close {
display: block;
position: absolute;
width: 20px;
height: 20px;
top: 5px;
left: -5px;
text-align: right;
font-size: 12px;
color: @color-tab-inactive-text!important;
cursor: pointer;
i {
display: inline-block;
z-index: 101;
top: -7px;
right: 5px;
position: relative;
}
&:hover i {
color: @brand-danger;
}
}
&.active span.close {
color: @color-tab-inactive-text;
}
&[data-modified] {
span.tab-close i {
top: -4px;
&:before {
content: @circle;
font-size: 9px;
}
}
}
}
}
}
&.master {
> ul.nav-tabs, > div > ul.nav-tabs, > div > div > ul.nav-tabs {
> li {
a {
font-size: 15px;
border-bottom: transparent 4px solid;
position: relative;
z-index: 101;
line-height: 100%;
}
&.active {
a {border-bottom: @color-tab-active-border 4px solid;}
}
}
}
}
&.primary {
margin-bottom: 5px;
> ul.nav-tabs, > div > ul.nav-tabs, > div > div > ul.nav-tabs {
position: relative;
2014-07-27 04:07:22 +00:00
margin-left: -20px;
margin-right: -20px;
2014-05-14 13:24:20 +00:00
&:before {
position: absolute;
2014-07-27 04:07:22 +00:00
top: 26px;
2014-05-14 13:24:20 +00:00
height: 1px;
width: 100%;
content: ' ';
border-bottom: 1px solid @color-ui-border;
}
> li {
padding-right: 10px;
padding-left: 11px;
margin-right: 0;
2014-07-27 04:07:22 +00:00
margin-left: -30px;
2014-05-14 13:24:20 +00:00
background: transparent;
2014-07-27 04:07:22 +00:00
&:first-child {
margin-left: 0;
padding-left: 15px!important;
}
2014-05-14 13:24:20 +00:00
a {
font-size: 12px;
padding-bottom: 3px;
2014-07-27 04:07:22 +00:00
padding: 0 16px;
margin: 0;
2014-05-14 13:24:20 +00:00
position: relative;
z-index: 101;
background: transparent;
2014-07-27 04:07:22 +00:00
overflow: visible;
> span.title {
position: relative;
display: inline-block;
padding: 5px 5px 9px 5px;
.box-sizing(border-box);
border-top: 1px solid #f0f0f0;
z-index: 100;
&:before, &:after {
content: ' ';
position: absolute;
2014-07-28 03:17:40 +00:00
background: transparent url(../images/primary-tab-shape.png?v2) no-repeat left -31px;
2014-07-27 04:07:22 +00:00
width: 16px;
height: 26px;
display: block;
top: -1px;
z-index: 100;
}
&:before {
left: -16px;
}
&:after {
right: -16px;
background-position: -61px -31px;
}
}
2014-05-14 13:24:20 +00:00
}
&:last-child {
background-image: none;
margin-right: 0;
padding-right: 5px;
}
&:first-child {
padding-left: 0;
}
2014-07-27 04:07:22 +00:00
&.active a:before {
position: absolute;
top: 26px;
height: 1px;
right: 2px;
left: 0;
content: ' ';
background-color: @color-body-bg;
}
&.active a{
z-index: 107;
> span.title {
z-index: 105;
border-top-color: #d6d6d6;
&:before {
background-position: left 0;
z-index: 107;
}
&:after {
background-position: -61px 0;
z-index: 107;
}
2014-05-14 13:24:20 +00:00
}
}
}
}
> div.tab-content {
}
}
&.secondary {
> ul.nav-tabs, > div > ul.nav-tabs, > div > div > ul.nav-tabs {
> li {
padding-right: 10px;
margin-right: 10px;
border-right: 1px solid @color-ui-border;
2014-05-14 13:24:20 +00:00
a {
font-size: 12px;
font-weight: 600;
padding-bottom: 0;
}
&:last-child {
border-right: none;
margin-right: 0;
padding-right: 0;
}
}
}
}
&.content-tabs {
2014-06-28 23:59:43 +00:00
> ul.nav-tabs {
position: relative;
&:before {
content: ' ';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 1px;
background: @color-tab-content-border;
}
li {
margin-right: 0;
2014-07-11 08:50:11 +00:00
border-top: 1px solid @color-tab-content-border;
border-right: 1px solid @color-tab-content-border;
a {
font-size: 12px;
padding: 17px 20px;
margin: 0;
border: none;
text-transform: uppercase;
background: transparent;
}
&:first-child {
2014-07-11 08:50:11 +00:00
border-left: 1px solid @color-tab-content-border;
}
&:last-child {
2014-07-11 08:50:11 +00:00
border-right: 1px solid @color-tab-content-border;
}
&.active {
background: @color-tab-content-active-bg;
a {
font-weight: 600;
}
}
}
}
> .tab-content > .tab-pane {
padding-top: 0;
2014-07-21 07:45:05 +00:00
div.list-header,
div.padded-container,
div.toolbar-widget {
background: @color-tab-content-active-bg;
padding-top: 20px;
}
}
// Tabs to sit in by the standard offset (20px)
&.tabs-offset {
> ul.nav-tabs {
li:first-child {
margin-left: 20px;
}
}
}
// Tabs to sit flush to the element above
&.tabs-flush {
> ul.nav-tabs {
li {
border-top: none;
}
2014-07-11 08:50:11 +00:00
li:last-child {
border-right: 1px solid transparent;
}
li:first-child {
2014-07-11 08:50:11 +00:00
border-left: 1px solid transparent;
}
li.active:last-child {
border-right: 1px solid @color-tab-content-border;
}
}
}
}
2014-05-14 13:24:20 +00:00
}
&.hide-tabs {
.control-tabs {
ul.nav-tabs {display: none;}
> div.tab-content > div.tab-pane {
padding-top: 0;
}
}
2014-05-16 04:09:16 +00:00
}
.form-sidebar {
.control-tabs.secondary {
> div > ul.nav-tabs > li a {
background: transparent;
}
}
2014-05-14 13:24:20 +00:00
}