tabbed-panels.scss
3.47 KB
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
$baseFontSize: 13;
@function pxToEm($px, $baseSize: $baseFontSize) {
@return ($px / $baseSize) * 1em;
}
$contentHorizontalPadding: 12px;
.ame-tabbed-panel {
display: flex;
flex-direction: row;
}
.ame-tp-tabs {
display: flex;
flex-direction: column;
width: 200px;
margin: 0;
border-right: 1px solid #dcdcde;
background-color: #f7f7f7;
li {
margin: 0;
&:hover {
}
&.ui-state-active {
background-color: #fff;
a {
color: #333;
border-right-color: #fff;
font-weight: 600;
box-shadow: none;
}
}
}
a {
display: block;
padding: 8px 10px;
text-decoration: none;
border-bottom: 1px solid #dcdcde;
border-right: 1px solid transparent;
margin-right: -1px;
font-size: 14px;
box-shadow: none;
}
}
.ame-tp-content {
flex: 1;
padding: 0 $contentHorizontalPadding 8px $contentHorizontalPadding;
background: white;
}
.ame-tp-section {
font-size: $baseFontSize * 1px;
.ame-tp-control-group-title {
$titleFontSize: 14;
font-weight: 600;
font-size: pxToEm($titleFontSize);
margin: 0 0 pxToEm(4, $titleFontSize) 0;
width: pxToEm(180, $titleFontSize);
min-width: pxToEm(50, $titleFontSize);
flex-grow: 0;
}
.ame-tp-control-group {
margin-bottom: pxToEm(8);
display: flex;
flex-wrap: wrap;
}
.ame-tp-control-group-children {
//Adjust the layout of some child controls that look weird outside a form table.
.wp-color-result {
margin-bottom: 0;
}
fieldset > p {
margin: 0 0 4px 0;
}
}
.ame-tp-section {
margin-bottom: pxToEm(15);
}
//Nested section titles.
.ame-tp-section-children {
.ame-tp-section-title {
font-size: pxToEm(15);
border-width: 1px 0;
border-style: solid;
border-color: #ccc;
background: #f9f9f9;
padding-top: 3px;
padding-bottom: 4px;
//Expand the title background to the left and right edges of the content area.
/*margin-left: -$contentHorizontalPadding;
margin-right: -$contentHorizontalPadding;
padding-left: $contentHorizontalPadding;
padding-right: $contentHorizontalPadding;*/
}
}
}
//For layout with left-aligned labels.
.ame-tp-section {
.ame-tp-control-group-title {
padding-top: 4px;
}
.ame-tp-control-group {
margin-bottom: pxToEm(14);
}
.ame-tp-control-group-children {
//Move plain controls (like a checkbox in a label element) down
//to match the group title position.
> label {
padding-top: pxToEm(5);
}
}
}
//Alternative layout that takes up 100% of the available height and scrolls
//the tab contents they're too tall.
.ame-tp-height-100 {
&.ame-tabbed-panel {
height: 100%
}
.ame-tp-content {
box-sizing: border-box;
height: 100%;
//Move the padding to the individual tabs instead of the content area.
//A tab's scroll bar should be flush to the right edge, without any extra
//padding after it.
padding-right: 0;
}
.ame-tp-content > .ui-tabs-panel {
box-sizing: border-box;
height: 100%;
overflow-y: auto;
//Content padding was moved here from the content area.
padding-right: $contentHorizontalPadding;
}
.ame-tp-tabs {
box-sizing: border-box;
height: 100%;
/*
Overflow must be visible or the "push the active tab over the border to hide the border"
trick won't work. Apparently, combining "overflow-x: visible" with "overflow-y: auto"
causes the browser to convert "visible" to "auto".
@see https://stackoverflow.com/questions/6421966/css-overflow-x-visible-and-overflow-y-hidden-causing-scrollbar-issue/6433475#6433475
*/
overflow-y: visible;
overflow-x: visible;
}
}