|
39 | 39 | } |
40 | 40 |
|
41 | 41 | // 2. Vertical tabs (sidebar navigation) |
42 | | -.sidebar-navigation { |
43 | | - $dd-border-color: $cr-cyan; |
44 | | - $dd-color: $cr-gray-light; |
45 | | - $dd-color-hover: $cr-gray; |
| 42 | +.sidebar-nav, |
| 43 | +.sidebar-subnav { |
| 44 | + background-color: #F4F4F4; |
| 45 | + list-style-type: none; |
| 46 | + margin: 0 0 0.5rem; |
| 47 | + padding: 0; |
| 48 | +} |
46 | 49 |
|
47 | | - .dropdown { |
| 50 | +.sidebar-nav { |
| 51 | + @media screen and (min-width: $screen-md) { |
| 52 | + background-color: transparent; |
48 | 53 | display: block; |
49 | | - z-index: 1; |
| 54 | + /* stylelint-disable declaration-no-important */ |
| 55 | + // Forces override of collapse, which we don't want on larger screens. |
| 56 | + height: auto !important; |
| 57 | + /* stylelint-enable declaration-no-important */ |
50 | 58 | } |
| 59 | +} |
51 | 60 |
|
52 | | - .dropdown-menu { |
53 | | - right: 0; |
| 61 | +.sidebar-nav-item, |
| 62 | +.sidebar-subnav-item { |
| 63 | + margin-bottom: 0.25rem; |
54 | 64 |
|
55 | | - > li > a { |
56 | | - white-space: normal; |
57 | | - } |
| 65 | + &:last-child { |
| 66 | + margin-bottom: 0; |
| 67 | + } |
| 68 | +} |
| 69 | + |
| 70 | +.sidebar-nav-link, |
| 71 | +.sidebar-nav-trigger, |
| 72 | +.sidebar-subnav-link { |
| 73 | + border-left: 0.1875rem solid transparent; |
| 74 | + color: $cr-gray-light; |
| 75 | + display: inline-block; |
| 76 | + font-size: 0.875rem; |
| 77 | + line-height: 1.5rem; |
| 78 | + padding: 0.25rem 0.75rem; |
| 79 | + |
| 80 | + &:active, |
| 81 | + &:hover { |
| 82 | + border-left-color: $cr-gray-lighter; |
| 83 | + color: $cr-gray; |
| 84 | + text-decoration: none; |
| 85 | + } |
| 86 | + |
| 87 | + &:focus { |
| 88 | + color: $cr-gray-light; |
| 89 | + text-decoration: none; |
| 90 | + } |
| 91 | + |
| 92 | + &.active { |
| 93 | + border-left-color: $cr-cyan; |
| 94 | + color: $cr-gray; |
| 95 | + } |
| 96 | + |
| 97 | + svg.icon { |
| 98 | + display: inline-block; |
| 99 | + height: 0.75rem; |
| 100 | + margin-left: 0.5rem; |
| 101 | + width: 0.75rem; |
| 102 | + transition: transform 0.35s ease; |
| 103 | + } |
| 104 | + |
| 105 | + &[aria-expanded=true] svg.icon { |
| 106 | + transform: rotate(180deg); |
58 | 107 | } |
| 108 | +} |
| 109 | + |
| 110 | +.sidebar-subnav { |
| 111 | + background-color: transparent; |
| 112 | + margin: 0.5rem 0 0; |
| 113 | +} |
| 114 | + |
| 115 | +.sidebar-subnav-link { |
| 116 | + padding-left: 1.5rem; |
| 117 | +} |
| 118 | + |
| 119 | +.sidebar-nav-trigger { |
| 120 | + background-color: $cr-gray-lighter; |
| 121 | + border: 1px solid #CACACA; |
| 122 | + display: block; |
| 123 | + line-height: 1; |
| 124 | + padding-bottom: 0.75rem; |
| 125 | + padding-top: 0.75rem; |
| 126 | + text-align: left; |
| 127 | + width: 100%; |
59 | 128 |
|
60 | 129 | @media screen and (min-width: $screen-md) { |
61 | | - .dropdown { |
62 | | - .btn { |
63 | | - display: none; |
64 | | - } |
| 130 | + display: none; |
| 131 | + } |
65 | 132 |
|
66 | | - .dropdown-menu { |
67 | | - border: 0; |
68 | | - border-radius: 0; |
69 | | - box-shadow: none; |
70 | | - display: block; |
71 | | - position: relative; |
72 | | - } |
73 | | - } |
| 133 | + &.active, |
| 134 | + &:active, |
| 135 | + &:focus, |
| 136 | + &:hover { |
| 137 | + border: 1px solid #CACACA; |
| 138 | + } |
74 | 139 |
|
75 | | - .dropdown .dropdown-menu > li > a { |
76 | | - color: $dd-color; |
77 | | - margin-bottom: 0.5rem; |
78 | | - padding-top: 0; |
79 | | - padding-bottom: 0; |
80 | | - |
81 | | - &.active, |
82 | | - &:active, |
83 | | - &:hover, |
84 | | - &:focus { |
85 | | - background: transparent; |
86 | | - border-left: 3px solid $dd-border-color; |
87 | | - color: $dd-color-hover; |
88 | | - padding-left: 17px; |
89 | | - } |
90 | | - } |
| 140 | + svg.icon { |
| 141 | + float: right; |
| 142 | + margin-top: 0.125rem; |
91 | 143 | } |
92 | 144 | } |
0 commit comments