summaryrefslogtreecommitdiffstats
path: root/WebContent/VAADIN/themes/valo/util/_util.scss
blob: 1f983c0dad2332b4b8b9fc2c8a2a72f7051288c7 (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
// Align element vertically inside
@mixin valo-vertical-align-guide ($to-align: (), $align: middle, $pseudo-element: after) {
  &:#{$pseudo-element} {
    content: "";
    display: inline-block;
    width: 0;
    height: 100%;
    vertical-align: middle;
  }

  @if length($to-align) > 0 {
    @each $selector in $to-align {
      & > #{$selector} {
        vertical-align: $align;
      }
    }
  }
}



@mixin valo-tappable {
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  -webkit-touch-callout: none;
  cursor: pointer;
}



@mixin width-range($min: 0, $max: null) {
  &[width-range~="#{$min}-#{$max}"] {
    @content;
  }
}

@mixin height-range($min: 0, $max: null) {
  &[height-range~="#{$min}-#{$max}"] {
    @content;
  }
}