1window {
2  // lamefun trick to get rounded borders regardless of CSD use
3  border-width: 0px;
4
5  // this needs to be transparent
6  // see bug #722563
7  $_wm_border: if($variant=='light', transparentize(black, 0.77), transparentize(black, 0.25));
8  $_wm_border_backdrop: if($variant=='light', transparentize(black, 0.82), transparentize(black, 0.25));
9
10  &.csd {
11    box-shadow: 0 1px 3px 3px transparent,
12                0 2px 8px 2px transparentize(black, 0.87),
13                0 3px 20px 10px transparentize(black, 0.91),
14                0 6px 32px 16px transparentize(black, 0.96),
15                0 0 0 1px $_wm_border; //doing borders with box-shadow
16    margin: 0px;
17    border-radius: $window_radius;
18
19    @if $variant == 'dark' {
20      $_window_outline: if($contrast=='high', transparentize(white, .7), transparentize(white, .9));
21      outline: 1px solid $_window_outline;
22      outline-offset: -1px;
23    }
24
25    &:backdrop {
26      // the transparent shadow here is to enforce that the shadow extents don't
27      // change when we go to backdrop, to prevent jumping windows.
28      // The biggest shadow should be in the same order then in the active state
29      // or the jumping will happen during the transition.
30      box-shadow: 0 1px 3px 3px transparentize(black, 0.91),
31                  0 2px 14px 5px transparentize(black, 0.95),
32                  0 4px 28px 12px transparentize(black, 0.97),
33                  0 6px 32px 16px transparent,
34                  0 0 0 1px $_wm_border_backdrop;
35      transition: $backdrop_transition;
36    }
37
38    &.dialog.message {
39      box-shadow: 0 1px 2px transparentize(black, 0.8),
40                  0 0 0 1px transparentize($_wm_border, 0.1);
41    }
42
43    &.tiled,
44    &.tiled-top,
45    &.tiled-left,
46    &.tiled-right,
47    &.tiled-bottom {
48      border-radius: 0;
49      outline: none;
50
51      box-shadow: 0 0 0 1px $_wm_border,
52                  0 0 0 20px transparent; //transparent control workaround -- #3670
53
54      &:backdrop {
55        box-shadow: 0 0 0 1px $_wm_border_backdrop,
56                    0 0 0 20px transparent;
57      }
58    }
59
60    &.maximized,
61    &.fullscreen {
62      border-radius: 0;
63      outline: none;
64      box-shadow: none;
65      transition: none;
66    }
67  }
68
69  &.solid-csd {
70    margin: 0;
71    padding: 5px;
72    border-radius: 0;
73    box-shadow: inset 0 0 0 5px $borders_color,
74                inset 0 0 0 4px $headerbar_bg_color,
75                inset 0 0 0 1px $_wm_border;
76
77    &:backdrop {
78      box-shadow: inset 0 0 0 5px $borders_color,
79                  inset 0 0 0 4px $bg_color,
80                  inset 0 0 0 1px $_wm_border_backdrop;
81    }
82  }
83
84  // server-side decorations as used by mutter
85  &.ssd { box-shadow: 0 0 0 1px $_wm_border; } //just doing borders, wm draws actual shadows
86}
87