|
1 | 1 | // Copyright 2015 Palantir Technologies, Inc. All rights reserved. |
2 | 2 | // Licensed under the Apache License, Version 2.0. |
3 | 3 |
|
| 4 | +@use "sass:list"; |
4 | 5 | @import "../../common/variables"; |
5 | 6 | @import "../forms/common"; |
6 | 7 | @import "./common"; |
|
12 | 13 | // ensure button can never be smaller than its default size |
13 | 14 | flex: 0 0 auto; |
14 | 15 | position: relative; |
15 | | - z-index: index($control-group-stack, "button-default"); |
| 16 | + z-index: list.index($control-group-stack, "button-default"); |
16 | 17 |
|
17 | 18 | // the ordering of these z-index CSS rules is particular because of CSS |
18 | 19 | // selector specificity. specifically, disabled styles should have |
19 | 20 | // precedence over hover and active styles to prevent mouse interactions on |
20 | 21 | // disabled buttons from reordering elements in the stack. |
21 | 22 |
|
22 | 23 | &:focus { |
23 | | - z-index: index($control-group-stack, "button-focus"); |
| 24 | + z-index: list.index($control-group-stack, "button-focus"); |
24 | 25 | } |
25 | 26 |
|
26 | 27 | &:hover { |
27 | | - z-index: index($control-group-stack, "button-hover"); |
| 28 | + z-index: list.index($control-group-stack, "button-hover"); |
28 | 29 | } |
29 | 30 |
|
30 | 31 | &:active, |
31 | 32 | &.#{$ns}-active { |
32 | | - z-index: index($control-group-stack, "button-active"); |
| 33 | + z-index: list.index($control-group-stack, "button-active"); |
33 | 34 | } |
34 | 35 |
|
35 | 36 | &:disabled, |
36 | 37 | &.#{$ns}-disabled { |
37 | | - z-index: index($control-group-stack, "button-disabled"); |
| 38 | + z-index: list.index($control-group-stack, "button-disabled"); |
38 | 39 | } |
39 | 40 |
|
40 | 41 | &[class*="#{$ns}-intent-"] { |
41 | | - z-index: index($control-group-stack, "intent-button-default"); |
| 42 | + z-index: list.index($control-group-stack, "intent-button-default"); |
42 | 43 |
|
43 | 44 | &:focus { |
44 | | - z-index: index($control-group-stack, "intent-button-focus"); |
| 45 | + z-index: list.index($control-group-stack, "intent-button-focus"); |
45 | 46 | } |
46 | 47 |
|
47 | 48 | &:hover { |
48 | | - z-index: index($control-group-stack, "intent-button-hover"); |
| 49 | + z-index: list.index($control-group-stack, "intent-button-hover"); |
49 | 50 | } |
50 | 51 |
|
51 | 52 | &:active, |
52 | 53 | &.#{$ns}-active { |
53 | | - z-index: index($control-group-stack, "intent-button-active"); |
| 54 | + z-index: list.index($control-group-stack, "intent-button-active"); |
54 | 55 | } |
55 | 56 |
|
56 | 57 | &:disabled, |
57 | 58 | &.#{$ns}-disabled { |
58 | | - z-index: index($control-group-stack, "intent-button-disabled"); |
| 59 | + z-index: list.index($control-group-stack, "intent-button-disabled"); |
59 | 60 | } |
60 | 61 | } |
61 | 62 | } |
|
0 commit comments