Skip to content

Commit 7503c7d

Browse files
crisbetojelbourn
authored andcommitted
Change the overlay variable prefixes to cdk- and remove dependency on theming.
1 parent 8c894df commit 7503c7d

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

src/lib/core/overlay/_overlay.scss

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
@import '../style/variables';
2-
@import '../theming/palette';
3-
@import '../theming/theming';
42

53

64
@mixin cdk-overlay() {
@@ -18,7 +16,7 @@
1816
// The overlay-container is an invisible element which contains all individual overlays.
1917
.cdk-overlay-container {
2018
position: fixed;
21-
z-index: $md-z-index-overlay-container;
19+
z-index: $cdk-z-index-overlay-container;
2220
}
2321

2422
// We use an extra wrapper element in order to use make the overlay itself a flex item.
@@ -28,15 +26,15 @@
2826
.cdk-global-overlay-wrapper {
2927
display: flex;
3028
position: absolute;
31-
z-index: $md-z-index-overlay;
29+
z-index: $cdk-z-index-overlay;
3230
}
3331

3432
// A single overlay pane.
3533
.cdk-overlay-pane {
3634
position: absolute;
3735
pointer-events: auto;
3836
box-sizing: border-box;
39-
z-index: $md-z-index-overlay;
37+
z-index: $cdk-z-index-overlay;
4038
}
4139

4240
.cdk-overlay-backdrop {
@@ -47,7 +45,7 @@
4745
left: 0;
4846
right: 0;
4947

50-
z-index: $md-z-index-overlay-backdrop;
48+
z-index: $cdk-z-index-overlay-backdrop;
5149
pointer-events: auto;
5250

5351
// TODO(jelbourn): figure out if there are actually spec'ed colors for both light and dark
@@ -61,7 +59,7 @@
6159
}
6260

6361
.cdk-overlay-dark-backdrop {
64-
background: md-color($md-grey, 900); // TODO(crisbeto): make this theme-independent?
62+
background: $cdk-overlay-dark-backdrop-background;
6563
}
6664

6765
.cdk-overlay-transparent-backdrop {

src/lib/core/style/_variables.scss

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@ $z-index-drawer: 100 !default;
2222
// We want overlays to always appear over user content, so set a baseline
2323
// very high z-index for the overlay container, which is where we create the new
2424
// stacking context for all overlays.
25-
$md-z-index-overlay-container: 1000;
26-
$md-z-index-overlay: 1000;
27-
$md-z-index-overlay-backdrop: 1;
25+
$cdk-z-index-overlay-container: 1000;
26+
$cdk-z-index-overlay: 1000;
27+
$cdk-z-index-overlay-backdrop: 1;
28+
29+
// Background color for all of the backdrops
30+
$cdk-overlay-dark-backdrop-background: rgba(0, 0, 0, 0.6);
2831

2932

3033
// Global constants

0 commit comments

Comments
 (0)