-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_object.tabs.scss
More file actions
72 lines (54 loc) · 1.87 KB
/
Copy path_object.tabs.scss
File metadata and controls
72 lines (54 loc) · 1.87 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
// =============================================================================
//
// Name: Tabs
//
// Description: Equal-width navigation tabs.
//
// Block: `o-tabs`
//
// Elements: `o-tabs__item`
// `o-tabs__link`
//
// Markup:
//
// <ul class="o-tabs">
// <li class="o-tabs__item">
// <a class="o-tabs__link" href="#">Foo</a>
// </li>
// <li class="o-tabs__item">
// <a class="o-tabs__link" href="#">Bar</a>
// </li>
// </ul>
//
// =============================================================================
// Variables
// =============================================================================
// Predefine the variables below in order to alter and enable specific features.
$tree-tabs-namespace: $tree-namespace !default;
// =============================================================================
// Block: `o-tabs`
// =============================================================================
// 1. Reset any residual styles (most likely from lists).
// 2. Tables for layout!
// 3. Force all `table-cell` children to have equal widths.
// 4. Force the object to be the full width of its parent. Combined with [2],
// this makes the object behave in a quasi-`display: block;` manner.
.#{$tree-tabs-namespace}o-tabs {
margin: 0; // [1]
padding: 0; // [1]
list-style: none; // [1]
display: table; // [2]
table-layout: fixed; // [3]
width: 100%; // [4]
text-align: center;
}
// Element: `o-tabs__item`
// =========================================================================
.#{$tree-tabs-namespace}o-tabs__item {
display: table-cell; // [2]
}
// Element: `o-tabs__link`
// =====================================================================
.#{$tree-tabs-namespace}o-tabs__link {
display: block;
}