-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstyle_tabs.less
111 lines (93 loc) · 2.12 KB
/
style_tabs.less
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
// Tab system styling
@number_of_tabs: 3;
@tab_border_width: 1px;
.circular--square {
border-radius: 50%;
}
.tab>label {
background: var(--nc-bg-3);
border: @tab_border_width solid var(--nc-bg-3);
color: var(--nc-tx-3);
cursor: pointer;
display: block;
//font-size: 12px;
margin-bottom: calc(@tab_border_width * -1);
padding: 1em;
text-transform: uppercase;
transition: all 0.7s;
transition-timing-function: ease;
}
.tab-content {
color: var(--nc-tx-2);
display: none;
}
.tab:hover label {
border-top-color: var(--nc-ac-1);
color: var(--nc-ac-tx);
}
.tabbed {
margin: 32px 0;
overflow-x: hidden;
padding-bottom: 16px;
}
.tabbed [type="radio"] {
display: none;
}
/*******************************
Set the max number of tabs
If this number is less than the
number of tabs additional tabs
will not work
The CSS generated takes advatage of
sibling combinators see w3 for more info
https://www.w3.org/TR/selectors-3/#general-sibling-combinators
********************************/
each(range(@number_of_tabs), {
.tabbed [type="radio"]:nth-of-type(@{value}):checked {
& ~ .tab-content:nth-of-type(@{value}) {
display:block
}
& ~ .tabs .tab:nth-of-type(@{value}) label {
background: var(--nc-bg-1);
border-bottom-color: var(--nc-bg-1);
border-top-color: #b721ff;
color: var(--nc-tx-2);
}
}
}
);
.tabs {
border-bottom: 1px solid var(--nc-ac-1);
display: flex;
list-style: none;
padding: 0;
}
/* summary / details */
details {
background: var(--nc-bg-2);
box-shadow: 0 .1rem 1rem -.5rem var(--nc-bg-2);
margin: 1rem 0.5rem;
//overflow: hidden;
transition: .3s all ease;
}
summary {
outline: none;
border: none;
cursor: pointer;
display: block;
padding: 1rem;
padding-left: 2.2rem;
position: relative;
&::before {
border-color: transparent transparent transparent var(--nc-tx-2);
border-style: solid;
border-width: .4rem;
content: '';
left: 1rem;
position: absolute;
top: 1.3rem;
transform: rotate(0);
transform-origin: .2rem 50%;
transition: .25s transform ease;
}
}