aboutsummaryrefslogtreecommitdiffstats
path: root/WebContent/VAADIN/themes/valo/components/_dragwrapper.scss
blob: 0aa1cf54fd37ba69d1b3b50695bb4a7b9e5efca7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
@mixin valo-dragwrapper ($primary-stylename: v-ddwrapper) {

  [draggable=true] {
    -khtml-user-drag: element;
    -webkit-user-drag: element;
    @include user-select(none);
  }

  .v-active-drag-source {
    @include opacity(0);
  }

  .#{$primary-stylename} {
    position: relative;
  }

  .#{$primary-stylename}-over:before,
  .#{$primary-stylename}-over:after {
    content: "";
    position: absolute;
    z-index: 10;
    top: -1px;
    right: -1px;
    bottom: -1px;
    left: -1px;
  }

  .#{$primary-stylename}-over-top:before {
    border-top-width: 2px;
  }

  .#{$primary-stylename}-over-right:before {
    border-right-width: 2px;
  }

  .#{$primary-stylename}-over-bottom:before {
    border-bottom-width: 2px;
  }

  .#{$primary-stylename}-over-left:before {
    border-left-width: 2px;
  }

  .no-vertical-drag-hints {
    .#{$primary-stylename}-over-top,
    &.#{$primary-stylename}-over-top {
      &:before {
        border-top-width: 0;
      }
      &:after {
        @include valo-ddwrapper-box-hint-style;
      }
    }

    .#{$primary-stylename}-over-bottom,
    &.#{$primary-stylename}-over-bottom {
      &:before {
        border-bottom-width: 0;
      }
      &:after {
        @include valo-ddwrapper-box-hint-style;
      }
    }
  }

  .no-horizontal-drag-hints {
    &.#{$primary-stylename}-over-left,
    .#{$primary-stylename}-over-left {
      &:before {
        border-left-width: 0;
      }
      &:after {
        @include valo-ddwrapper-box-hint-style;
      }
    }

    &.#{$primary-stylename}-over-right,
    .#{$primary-stylename}-over-right {
      &:before {
        border-right-width: 0;
      }
      &:after {
        @include valo-ddwrapper-box-hint-style;
      }
    }
  }

  .#{$primary-stylename}-over-middle:after,
  .#{$primary-stylename}-over-center:after {
    @include valo-ddwrapper-box-hint-style;
  }

  .no-box-drag-hints {
    &.#{$primary-stylename}:after,
    .#{$primary-stylename}:after {
      display: none !important;
      content: none;
    }
  }


}




@mixin valo-ddwrapper-box-hint-style {
  border-width: 2px;
  border-radius: $v-border-radius;
  @include opacity(.3);

  $focus-color: valo-focus-color();
  @if is-dark-color($focus-color) {
    background: scale-color($focus-color, $lightness: 50%);
  } @else {
    background: scale-color($focus-color, $lightness: -50%);
  }
}