|
2 | 2 | @import "./action-sheet.ios.vars";
|
3 | 3 |
|
4 | 4 | // iOS Action Sheet
|
5 |
| -// -------------------------------------------------- |
| 5 | +// --------------------------------------------------- |
6 | 6 |
|
7 | 7 | :host {
|
8 | 8 | --background: #{$action-sheet-ios-background-color};
|
9 |
| - --background-selected: #{var(--background, $action-sheet-ios-button-background-selected)}; |
| 9 | + --background-selected: #{$action-sheet-ios-button-background-selected)}; |
10 | 10 | --background-activated: #{$action-sheet-ios-button-background-activated};
|
11 | 11 |
|
12 | 12 | text-align: $action-sheet-ios-text-align;
|
|
18 | 18 |
|
19 | 19 |
|
20 | 20 | // iOS Action Sheet Container
|
21 |
| -// ----------------------------------------- |
| 21 | +// --------------------------------------------------- |
22 | 22 |
|
23 | 23 | .action-sheet-container {
|
24 | 24 | @include padding($action-sheet-ios-padding-top, $action-sheet-ios-padding-end, $action-sheet-ios-padding-bottom, $action-sheet-ios-padding-start);
|
25 | 25 | }
|
26 | 26 |
|
27 | 27 |
|
28 | 28 | // iOS Action Sheet Group
|
29 |
| -// ----------------------------------------- |
| 29 | +// --------------------------------------------------- |
30 | 30 |
|
31 | 31 | .action-sheet-group {
|
32 | 32 | @include border-radius($action-sheet-ios-border-radius);
|
33 | 33 | @include margin(null, null, $action-sheet-ios-group-margin-bottom - 2, null);
|
| 34 | + |
| 35 | + overflow: hidden; |
34 | 36 | }
|
35 | 37 |
|
36 | 38 | .action-sheet-group:first-child {
|
|
43 | 45 |
|
44 | 46 |
|
45 | 47 | // iOS Translucent Action Sheet
|
46 |
| -// ----------------------------------------- |
| 48 | +// --------------------------------------------------- |
| 49 | + |
| 50 | +@supports (backdrop-filter: blur(0)) { |
| 51 | + :host(.action-sheet-translucent) .action-sheet-group { |
| 52 | + background-color: transparent; |
| 53 | + backdrop-filter: $action-sheet-ios-group-translucent-filter; |
| 54 | + } |
| 55 | + |
| 56 | + :host(.action-sheet-translucent) .action-sheet-title, |
| 57 | + :host(.action-sheet-translucent) .action-sheet-button { |
| 58 | + background-color: transparent; |
| 59 | + background-image: |
| 60 | + linear-gradient(0deg, $action-sheet-ios-translucent-background-color, $action-sheet-ios-translucent-background-color 100%), |
| 61 | + linear-gradient(0deg, $action-sheet-ios-translucent-border-color, $action-sheet-ios-translucent-border-color 50%, $action-sheet-ios-translucent-background-color 50%); |
| 62 | + background-repeat: no-repeat; |
| 63 | + |
| 64 | + /* stylelint-disable-next-line all */ |
| 65 | + background-position: top, bottom; |
| 66 | + |
| 67 | + background-size: 100% calc(100% - 1px), 100% 1px; |
| 68 | + backdrop-filter: $action-sheet-ios-button-translucent-filter; |
| 69 | + } |
47 | 70 |
|
48 |
| -:host(.action-sheet-translucent) .action-sheet-group { |
49 |
| - background: $action-sheet-ios-translucent-background-color; |
50 |
| - backdrop-filter: $action-sheet-ios-translucent-filter; |
| 71 | + :host(.action-sheet-translucent) .action-sheet-button.activated { |
| 72 | + background-color: $action-sheet-ios-translucent-background-color-activated; |
| 73 | + background-image: none; |
| 74 | + } |
| 75 | + |
| 76 | + :host(.action-sheet-translucent) .action-sheet-cancel { |
| 77 | + background: var(--background-selected); |
| 78 | + } |
| 79 | +} |
| 80 | + |
| 81 | +// iOS Action Sheet Border |
| 82 | +// --------------------------------------------------- |
| 83 | +// Border is made with a linear gradient in order |
| 84 | +// to get the proper color and iOS blur effect |
| 85 | + |
| 86 | +.action-sheet-title, |
| 87 | +.action-sheet-button { |
| 88 | + background-color: transparent; |
| 89 | + background-image: linear-gradient(0deg, $action-sheet-ios-button-border-color, $action-sheet-ios-button-border-color 50%, transparent 50%); |
| 90 | + background-repeat: no-repeat; |
| 91 | + |
| 92 | + /* stylelint-disable-next-line all */ |
| 93 | + background-position: bottom; |
| 94 | + |
| 95 | + background-size: 100% 1px; |
51 | 96 | }
|
52 | 97 |
|
53 | 98 |
|
54 | 99 | // iOS Action Sheet Title
|
55 |
| -// ----------------------------------------- |
| 100 | +// --------------------------------------------------- |
56 | 101 |
|
57 | 102 | .action-sheet-title {
|
58 | 103 | @include padding($action-sheet-ios-title-padding-top, $action-sheet-ios-title-padding-end, $action-sheet-ios-title-padding-bottom, $action-sheet-ios-title-padding-start);
|
59 | 104 |
|
60 |
| - border-bottom: $action-sheet-ios-title-border-width $action-sheet-ios-title-border-style $action-sheet-ios-title-border-color; |
61 |
| - |
62 | 105 | color: var(--color, $action-sheet-ios-title-color);
|
63 | 106 |
|
64 | 107 | font-size: $action-sheet-ios-title-font-size;
|
|
75 | 118 |
|
76 | 119 |
|
77 | 120 | // iOS Action Sheet Buttons
|
78 |
| -// ----------------------------------------- |
| 121 | +// --------------------------------------------------- |
79 | 122 |
|
80 | 123 | .action-sheet-button {
|
81 |
| - @include margin(0); |
82 | 124 | @include padding($action-sheet-ios-button-padding);
|
83 | 125 |
|
84 | 126 | height: $action-sheet-ios-button-height;
|
85 | 127 |
|
86 |
| - border-bottom: $action-sheet-ios-button-border-width $action-sheet-ios-button-border-style $action-sheet-ios-button-border-color; |
87 |
| - |
88 |
| - background: transparent; |
89 | 128 | color: var(--color, $action-sheet-ios-button-text-color);
|
90 | 129 |
|
91 | 130 | font-size: $action-sheet-ios-button-font-size;
|
|
100 | 139 | }
|
101 | 140 |
|
102 | 141 | .action-sheet-button:last-child {
|
103 |
| - border-bottom-color: transparent; |
104 |
| -} |
105 |
| - |
106 |
| -.action-sheet-button.activated { |
107 |
| - @include margin(-$action-sheet-ios-button-border-width, null, null, null); |
108 |
| - |
109 |
| - border-top: $action-sheet-ios-button-border-width $action-sheet-ios-button-border-style var(--background-activated); |
110 |
| - border-bottom-color: var(--background-activated); |
| 142 | + background-image: none; |
111 | 143 | }
|
112 | 144 |
|
113 | 145 | .action-sheet-selected {
|
| 146 | + background: var(--background-selected); |
| 147 | + |
114 | 148 | font-weight: bold;
|
115 | 149 | }
|
116 | 150 |
|
|
0 commit comments