|
90 | 90 | margin-right: 0.2em; |
91 | 91 | } |
92 | 92 |
|
93 | | -/* Mike version selector styling */ |
94 | | -.md-header__topic { |
95 | | - display: flex; |
96 | | - align-items: center; |
97 | | -} |
| 93 | +/* Version selector styling - Material theme */ |
98 | 94 |
|
99 | | -.md-version-select { |
100 | | - margin-left: 0.6rem; |
| 95 | +/* Version selector container */ |
| 96 | +.md-version { |
| 97 | + position: relative; |
| 98 | + display: inline-block; |
| 99 | + margin-left: 0.25rem; |
101 | 100 | } |
102 | 101 |
|
| 102 | +/* Current version button styling */ |
103 | 103 | .md-version__current { |
104 | | - cursor: pointer; |
105 | | - color: var(--md-primary-bg-color); |
106 | | - font-weight: 700; |
107 | | - font-size: 0.8rem; |
108 | | - border: 1px solid rgba(255, 255, 255, 0.3); |
109 | | - border-radius: 4px; |
110 | | - padding: 0.2rem 0.4rem; |
111 | 104 | display: inline-flex; |
112 | 105 | align-items: center; |
| 106 | + font-size: 0.7rem; |
| 107 | + font-weight: 600; |
| 108 | + color: var(--md-primary-bg-color); |
| 109 | + padding: 0.4rem 0.8rem; |
| 110 | + margin: 0.4rem 0; |
| 111 | + background-color: rgba(255, 255, 255, 0.1); |
| 112 | + border-radius: 4px; |
| 113 | + border: 1px solid rgba(255, 255, 255, 0.2); |
| 114 | + cursor: pointer; |
| 115 | + transition: all 0.15s ease-in-out; |
| 116 | +} |
| 117 | + |
| 118 | +/* Hover effect for current version button */ |
| 119 | +.md-version__current:hover { |
| 120 | + background-color: rgba(255, 255, 255, 0.2); |
| 121 | + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); |
113 | 122 | } |
114 | 123 |
|
115 | | -.md-version__current::after { |
| 124 | +/* Down arrow for version dropdown */ |
| 125 | +.md-version__current:after { |
116 | 126 | display: inline-block; |
| 127 | + margin-left: 0.5rem; |
117 | 128 | content: ""; |
118 | | - width: 0; |
119 | | - height: 0; |
120 | | - border-left: 4px solid transparent; |
121 | | - border-right: 4px solid transparent; |
122 | | - border-top: 4px solid currentColor; |
123 | | - margin-left: 0.4rem; |
| 129 | + vertical-align: middle; |
| 130 | + border-top: 0.3em solid; |
| 131 | + border-right: 0.3em solid transparent; |
| 132 | + border-bottom: 0; |
| 133 | + border-left: 0.3em solid transparent; |
124 | 134 | } |
125 | 135 |
|
| 136 | +/* Dropdown menu */ |
126 | 137 | .md-version__list { |
127 | 138 | position: absolute; |
128 | 139 | top: 100%; |
129 | 140 | left: 0; |
| 141 | + z-index: 10; |
| 142 | + min-width: 125%; |
| 143 | + margin: 0.1rem 0 0; |
| 144 | + padding: 0; |
130 | 145 | background-color: var(--md-primary-fg-color); |
131 | 146 | border-radius: 4px; |
132 | | - box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); |
133 | | - z-index: 2; |
134 | | - min-width: 150px; |
135 | | - max-height: 0; |
136 | | - overflow: hidden; |
137 | | - transition: max-height 0.25s; |
| 147 | + box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); |
| 148 | + opacity: 0; |
| 149 | + visibility: hidden; |
| 150 | + transform: translateY(-8px); |
| 151 | + transition: all 0.2s ease; |
138 | 152 | } |
139 | 153 |
|
| 154 | +/* Show dropdown when parent is hovered */ |
140 | 155 | .md-version:hover .md-version__list { |
141 | | - max-height: 300px; |
| 156 | + opacity: 1; |
| 157 | + visibility: visible; |
| 158 | + transform: translateY(0); |
| 159 | +} |
| 160 | + |
| 161 | +/* Version list items */ |
| 162 | +.md-version__item { |
| 163 | + list-style: none; |
| 164 | + padding: 0; |
142 | 165 | } |
143 | 166 |
|
| 167 | +/* Version links */ |
144 | 168 | .md-version__link { |
145 | 169 | display: block; |
146 | 170 | padding: 0.5rem 1rem; |
| 171 | + font-size: 0.75rem; |
147 | 172 | color: var(--md-primary-bg-color); |
148 | | - font-size: 0.8rem; |
149 | | - transition: background-color 0.25s; |
| 173 | + transition: background-color 0.15s; |
| 174 | + text-decoration: none; |
150 | 175 | } |
151 | 176 |
|
| 177 | +/* Version link hover */ |
152 | 178 | .md-version__link:hover { |
153 | 179 | background-color: var(--md-primary-fg-color--dark); |
| 180 | + text-decoration: none; |
| 181 | +} |
| 182 | + |
| 183 | +/* Active version in dropdown */ |
| 184 | +.md-version__link--active { |
| 185 | + background-color: var(--md-accent-fg-color); |
| 186 | + color: var(--md-accent-bg-color); |
| 187 | + font-weight: 700; |
| 188 | +} |
| 189 | + |
| 190 | +/* For the Material selector */ |
| 191 | +.md-header__option { |
| 192 | + display: flex; |
| 193 | + align-items: center; |
| 194 | +} |
| 195 | + |
| 196 | +/* Version selector in Material 9.x */ |
| 197 | +.md-select { |
| 198 | + position: relative; |
| 199 | + margin-left: 0.5rem; |
| 200 | +} |
| 201 | + |
| 202 | +.md-select__label { |
| 203 | + font-size: 0.7rem; |
| 204 | + font-weight: 600; |
| 205 | + color: var(--md-primary-bg-color); |
| 206 | + cursor: pointer; |
| 207 | + padding: 0.4rem 0.8rem; |
| 208 | + background-color: rgba(255, 255, 255, 0.1); |
| 209 | + border-radius: 4px; |
| 210 | + border: 1px solid rgba(255, 255, 255, 0.2); |
| 211 | + transition: all 0.15s ease-in-out; |
| 212 | +} |
| 213 | + |
| 214 | +.md-select__label:hover { |
| 215 | + background-color: rgba(255, 255, 255, 0.2); |
| 216 | + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); |
| 217 | +} |
| 218 | + |
| 219 | +/* Version selector in Material 9.2+ */ |
| 220 | +.md-header__button.md-select { |
| 221 | + display: inline-flex; |
| 222 | + align-items: center; |
| 223 | + margin: 0 0.8rem; |
| 224 | +} |
| 225 | + |
| 226 | +/* For Material 9.x+ with specific version selector */ |
| 227 | +.md-typeset .md-version-warn { |
| 228 | + padding: 0.6rem 1rem; |
| 229 | + margin: 1.5rem 0; |
| 230 | + background-color: rgba(235, 8, 138, 0.1); |
| 231 | + border-left: 4px solid #eb088a; |
| 232 | + border-radius: 0.2rem; |
| 233 | + color: var(--md-default-fg-color); |
| 234 | + font-size: 0.8rem; |
154 | 235 | } |
0 commit comments