static/less/responsive-utilities.less
author stetrabby <info@trabucchi.de>
Fri, 20 Dec 2013 22:30:44 +0100
changeset 53 3416f82943ea
permissions -rwxr-xr-x
less initial added
info@53
     1
//
info@53
     2
// Responsive: Utility classes
info@53
     3
// --------------------------------------------------
info@53
     4
info@53
     5
info@53
     6
// IE10 in Windows (Phone) 8
info@53
     7
//
info@53
     8
// Support for responsive views via media queries is kind of borked in IE10, for
info@53
     9
// Surface/desktop in split view and for Windows Phone 8. This particular fix
info@53
    10
// must be accompanied by a snippet of JavaScript to sniff the user agent and
info@53
    11
// apply some conditional CSS to *only* the Surface/desktop Windows 8. Look at
info@53
    12
// our Getting Started page for more information on this bug.
info@53
    13
//
info@53
    14
// For more information, see the following:
info@53
    15
//
info@53
    16
// Issue: https://github.com/twbs/bootstrap/issues/10497
info@53
    17
// Docs: http://getbootstrap.com/getting-started/#browsers
info@53
    18
// Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/
info@53
    19
info@53
    20
@-ms-viewport {
info@53
    21
  width: device-width;
info@53
    22
}
info@53
    23
info@53
    24
info@53
    25
// Visibility utilities
info@53
    26
info@53
    27
.visible-xs {
info@53
    28
  .responsive-invisibility();
info@53
    29
  @media (max-width: @screen-xs-max) {
info@53
    30
    .responsive-visibility();
info@53
    31
  }
info@53
    32
  &.visible-sm {
info@53
    33
    @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
info@53
    34
      .responsive-visibility();
info@53
    35
    }
info@53
    36
  }
info@53
    37
  &.visible-md {
info@53
    38
    @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
info@53
    39
      .responsive-visibility();
info@53
    40
    }
info@53
    41
  }
info@53
    42
  &.visible-lg {
info@53
    43
    @media (min-width: @screen-lg-min) {
info@53
    44
      .responsive-visibility();
info@53
    45
    }
info@53
    46
  }
info@53
    47
}
info@53
    48
.visible-sm {
info@53
    49
  .responsive-invisibility();
info@53
    50
  &.visible-xs {
info@53
    51
    @media (max-width: @screen-xs-max) {
info@53
    52
      .responsive-visibility();
info@53
    53
    }
info@53
    54
  }
info@53
    55
  @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
info@53
    56
    .responsive-visibility();
info@53
    57
  }
info@53
    58
  &.visible-md {
info@53
    59
    @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
info@53
    60
      .responsive-visibility();
info@53
    61
    }
info@53
    62
  }
info@53
    63
  &.visible-lg {
info@53
    64
    @media (min-width: @screen-lg-min) {
info@53
    65
      .responsive-visibility();
info@53
    66
    }
info@53
    67
  }
info@53
    68
}
info@53
    69
.visible-md {
info@53
    70
  .responsive-invisibility();
info@53
    71
  &.visible-xs {
info@53
    72
    @media (max-width: @screen-xs-max) {
info@53
    73
      .responsive-visibility();
info@53
    74
    }
info@53
    75
  }
info@53
    76
  &.visible-sm {
info@53
    77
    @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
info@53
    78
      .responsive-visibility();
info@53
    79
    }
info@53
    80
  }
info@53
    81
  @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
info@53
    82
    .responsive-visibility();
info@53
    83
  }
info@53
    84
  &.visible-lg {
info@53
    85
    @media (min-width: @screen-lg-min) {
info@53
    86
      .responsive-visibility();
info@53
    87
    }
info@53
    88
  }
info@53
    89
}
info@53
    90
.visible-lg {
info@53
    91
  .responsive-invisibility();
info@53
    92
  &.visible-xs {
info@53
    93
    @media (max-width: @screen-xs-max) {
info@53
    94
      .responsive-visibility();
info@53
    95
    }
info@53
    96
  }
info@53
    97
  &.visible-sm {
info@53
    98
    @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
info@53
    99
      .responsive-visibility();
info@53
   100
    }
info@53
   101
  }
info@53
   102
  &.visible-md {
info@53
   103
    @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
info@53
   104
      .responsive-visibility();
info@53
   105
    }
info@53
   106
  }
info@53
   107
  @media (min-width: @screen-lg-min) {
info@53
   108
    .responsive-visibility();
info@53
   109
  }
info@53
   110
}
info@53
   111
info@53
   112
.hidden-xs {
info@53
   113
  .responsive-visibility();
info@53
   114
  @media (max-width: @screen-xs-max) {
info@53
   115
    .responsive-invisibility();
info@53
   116
  }
info@53
   117
  &.hidden-sm {
info@53
   118
    @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
info@53
   119
      .responsive-invisibility();
info@53
   120
    }
info@53
   121
  }
info@53
   122
  &.hidden-md {
info@53
   123
    @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
info@53
   124
      .responsive-invisibility();
info@53
   125
    }
info@53
   126
  }
info@53
   127
  &.hidden-lg {
info@53
   128
    @media (min-width: @screen-lg-min) {
info@53
   129
      .responsive-invisibility();
info@53
   130
    }
info@53
   131
  }
info@53
   132
}
info@53
   133
.hidden-sm {
info@53
   134
  .responsive-visibility();
info@53
   135
  &.hidden-xs {
info@53
   136
    @media (max-width: @screen-xs-max) {
info@53
   137
      .responsive-invisibility();
info@53
   138
    }
info@53
   139
  }
info@53
   140
  @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
info@53
   141
    .responsive-invisibility();
info@53
   142
  }
info@53
   143
  &.hidden-md {
info@53
   144
    @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
info@53
   145
      .responsive-invisibility();
info@53
   146
    }
info@53
   147
  }
info@53
   148
  &.hidden-lg {
info@53
   149
    @media (min-width: @screen-lg-min) {
info@53
   150
      .responsive-invisibility();
info@53
   151
    }
info@53
   152
  }
info@53
   153
}
info@53
   154
.hidden-md {
info@53
   155
  .responsive-visibility();
info@53
   156
  &.hidden-xs {
info@53
   157
    @media (max-width: @screen-xs-max) {
info@53
   158
      .responsive-invisibility();
info@53
   159
    }
info@53
   160
  }
info@53
   161
  &.hidden-sm {
info@53
   162
    @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
info@53
   163
      .responsive-invisibility();
info@53
   164
    }
info@53
   165
  }
info@53
   166
  @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
info@53
   167
    .responsive-invisibility();
info@53
   168
  }
info@53
   169
  &.hidden-lg {
info@53
   170
    @media (min-width: @screen-lg-min) {
info@53
   171
      .responsive-invisibility();
info@53
   172
    }
info@53
   173
  }
info@53
   174
}
info@53
   175
.hidden-lg {
info@53
   176
  .responsive-visibility();
info@53
   177
  &.hidden-xs {
info@53
   178
    @media (max-width: @screen-xs-max) {
info@53
   179
      .responsive-invisibility();
info@53
   180
    }
info@53
   181
  }
info@53
   182
  &.hidden-sm {
info@53
   183
    @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
info@53
   184
      .responsive-invisibility();
info@53
   185
    }
info@53
   186
  }
info@53
   187
  &.hidden-md {
info@53
   188
    @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
info@53
   189
      .responsive-invisibility();
info@53
   190
    }
info@53
   191
  }
info@53
   192
  @media (min-width: @screen-lg-min) {
info@53
   193
    .responsive-invisibility();
info@53
   194
  }
info@53
   195
}
info@53
   196
info@53
   197
// Print utilities
info@53
   198
.visible-print {
info@53
   199
  .responsive-invisibility();
info@53
   200
}
info@53
   201
info@53
   202
@media print {
info@53
   203
  .visible-print {
info@53
   204
    .responsive-visibility();
info@53
   205
  }
info@53
   206
  .hidden-print {
info@53
   207
    .responsive-invisibility();
info@53
   208
  }
info@53
   209
}
Impressum Datenschutzerklärung