padrino-admin 0.12.2 → 0.12.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/lib/padrino-admin.rb +9 -17
  3. data/lib/padrino-admin/access_control.rb +1 -0
  4. data/lib/padrino-admin/bootstrap-less/alerts.less +1 -1
  5. data/lib/padrino-admin/bootstrap-less/badges.less +10 -6
  6. data/lib/padrino-admin/bootstrap-less/bootstrap.less +0 -10
  7. data/lib/padrino-admin/bootstrap-less/breadcrumbs.less +6 -3
  8. data/lib/padrino-admin/bootstrap-less/button-groups.less +22 -44
  9. data/lib/padrino-admin/bootstrap-less/buttons.less +12 -17
  10. data/lib/padrino-admin/bootstrap-less/carousel.less +33 -10
  11. data/lib/padrino-admin/bootstrap-less/code.less +15 -8
  12. data/lib/padrino-admin/bootstrap-less/dropdowns.less +31 -11
  13. data/lib/padrino-admin/bootstrap-less/font-awesome/bordered-pulled.less +16 -0
  14. data/lib/padrino-admin/bootstrap-less/font-awesome/core.less +9 -126
  15. data/lib/padrino-admin/bootstrap-less/font-awesome/fixed-width.less +6 -0
  16. data/lib/padrino-admin/bootstrap-less/font-awesome/font-awesome.less +14 -30
  17. data/lib/padrino-admin/bootstrap-less/font-awesome/icons.less +409 -378
  18. data/lib/padrino-admin/bootstrap-less/font-awesome/larger.less +13 -0
  19. data/lib/padrino-admin/bootstrap-less/font-awesome/list.less +19 -0
  20. data/lib/padrino-admin/bootstrap-less/font-awesome/mixins.less +14 -42
  21. data/lib/padrino-admin/bootstrap-less/font-awesome/path.less +6 -6
  22. data/lib/padrino-admin/bootstrap-less/font-awesome/rotated-flipped.less +9 -0
  23. data/lib/padrino-admin/bootstrap-less/font-awesome/spinning.less +30 -0
  24. data/lib/padrino-admin/bootstrap-less/font-awesome/stacked.less +20 -0
  25. data/lib/padrino-admin/bootstrap-less/font-awesome/variables.less +377 -731
  26. data/lib/padrino-admin/bootstrap-less/forms.less +105 -39
  27. data/lib/padrino-admin/bootstrap-less/glyphicons.less +16 -15
  28. data/lib/padrino-admin/bootstrap-less/grid.less +59 -305
  29. data/lib/padrino-admin/bootstrap-less/input-groups.less +43 -13
  30. data/lib/padrino-admin/bootstrap-less/jumbotron.less +12 -8
  31. data/lib/padrino-admin/bootstrap-less/labels.less +6 -0
  32. data/lib/padrino-admin/bootstrap-less/list-group.less +37 -15
  33. data/lib/padrino-admin/bootstrap-less/mixins.less +283 -80
  34. data/lib/padrino-admin/bootstrap-less/modals.less +19 -22
  35. data/lib/padrino-admin/bootstrap-less/navbar.less +73 -78
  36. data/lib/padrino-admin/bootstrap-less/navs.less +45 -32
  37. data/lib/padrino-admin/bootstrap-less/normalize.less +148 -121
  38. data/lib/padrino-admin/bootstrap-less/padrino-admin.less +3 -1
  39. data/lib/padrino-admin/bootstrap-less/pager.less +5 -5
  40. data/lib/padrino-admin/bootstrap-less/pagination.less +8 -3
  41. data/lib/padrino-admin/bootstrap-less/panels.less +102 -20
  42. data/lib/padrino-admin/bootstrap-less/print.less +6 -5
  43. data/lib/padrino-admin/bootstrap-less/progress-bars.less +4 -19
  44. data/lib/padrino-admin/bootstrap-less/responsive-utilities.less +32 -159
  45. data/lib/padrino-admin/bootstrap-less/scaffolding.less +18 -14
  46. data/lib/padrino-admin/bootstrap-less/tables.less +47 -50
  47. data/lib/padrino-admin/bootstrap-less/theme.less +33 -18
  48. data/lib/padrino-admin/bootstrap-less/thumbnails.less +23 -18
  49. data/lib/padrino-admin/bootstrap-less/tooltip.less +9 -9
  50. data/lib/padrino-admin/bootstrap-less/type.less +139 -81
  51. data/lib/padrino-admin/bootstrap-less/utilities.less +15 -1
  52. data/lib/padrino-admin/bootstrap-less/variables.less +398 -191
  53. data/lib/padrino-admin/bootstrap-less/wells.less +1 -1
  54. data/lib/padrino-admin/generators/admin_app.rb +1 -1
  55. data/lib/padrino-admin/generators/templates/account/minirecord.rb.tt +1 -1
  56. data/lib/padrino-admin/generators/templates/assets/images/font/FontAwesome.otf +0 -0
  57. data/lib/padrino-admin/generators/templates/assets/images/font/fontawesome-webfont.eot +0 -0
  58. data/lib/padrino-admin/generators/templates/assets/images/font/fontawesome-webfont.svg +23 -8
  59. data/lib/padrino-admin/generators/templates/assets/images/font/fontawesome-webfont.ttf +0 -0
  60. data/lib/padrino-admin/generators/templates/assets/images/font/fontawesome-webfont.woff +0 -0
  61. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/affix.js +36 -25
  62. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/alert.js +7 -17
  63. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap.min.js +6 -6
  64. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/button.js +26 -28
  65. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/carousel.js +22 -34
  66. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/collapse.js +9 -18
  67. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/dropdown.js +25 -32
  68. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/modal.js +27 -30
  69. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/popover.js +16 -23
  70. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/scrollspy.js +19 -24
  71. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/tab.js +10 -20
  72. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/tooltip.js +54 -41
  73. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/transition.js +13 -21
  74. data/lib/padrino-admin/generators/templates/assets/javascripts/jquery-1.11.0.min.js +4 -0
  75. data/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap.css +4 -1238
  76. data/lib/padrino-admin/generators/templates/assets/stylesheets/fonts/FontAwesome.otf +0 -0
  77. data/lib/padrino-admin/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.eot +0 -0
  78. data/lib/padrino-admin/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.svg +414 -0
  79. data/lib/padrino-admin/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.ttf +0 -0
  80. data/lib/padrino-admin/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.woff +0 -0
  81. data/lib/padrino-admin/generators/templates/erb/app/base/index.erb.tt +5 -5
  82. data/lib/padrino-admin/generators/templates/erb/app/errors/403.erb.tt +1 -1
  83. data/lib/padrino-admin/generators/templates/erb/app/errors/404.erb.tt +1 -1
  84. data/lib/padrino-admin/generators/templates/erb/app/errors/500.erb.tt +1 -1
  85. data/lib/padrino-admin/generators/templates/erb/app/layouts/application.erb.tt +2 -2
  86. data/lib/padrino-admin/generators/templates/erb/app/sessions/new.erb.tt +1 -1
  87. data/lib/padrino-admin/generators/templates/erb/page/index.erb.tt +5 -5
  88. data/lib/padrino-admin/generators/templates/haml/app/base/index.haml.tt +5 -5
  89. data/lib/padrino-admin/generators/templates/haml/app/errors/403.haml.tt +1 -1
  90. data/lib/padrino-admin/generators/templates/haml/app/errors/404.haml.tt +1 -1
  91. data/lib/padrino-admin/generators/templates/haml/app/errors/500.haml.tt +1 -1
  92. data/lib/padrino-admin/generators/templates/haml/app/layouts/application.haml.tt +2 -2
  93. data/lib/padrino-admin/generators/templates/haml/app/sessions/new.haml.tt +2 -1
  94. data/lib/padrino-admin/generators/templates/haml/page/index.haml.tt +4 -4
  95. data/lib/padrino-admin/generators/templates/slim/app/base/index.slim.tt +5 -5
  96. data/lib/padrino-admin/generators/templates/slim/app/errors/403.slim.tt +1 -1
  97. data/lib/padrino-admin/generators/templates/slim/app/errors/404.slim.tt +1 -1
  98. data/lib/padrino-admin/generators/templates/slim/app/errors/500.slim.tt +1 -1
  99. data/lib/padrino-admin/generators/templates/slim/app/layouts/application.slim.tt +2 -2
  100. data/lib/padrino-admin/generators/templates/slim/app/sessions/new.slim.tt +1 -1
  101. data/lib/padrino-admin/generators/templates/slim/page/index.slim.tt +4 -4
  102. data/lib/padrino-admin/helpers/view_helpers.rb +1 -1
  103. data/lib/padrino-admin/locale/admin/zh_tw.yml +22 -22
  104. data/lib/padrino-admin/locale/orm/cs.yml +0 -25
  105. data/lib/padrino-admin/locale/orm/da.yml +0 -25
  106. data/lib/padrino-admin/locale/orm/de.yml +0 -25
  107. data/lib/padrino-admin/locale/orm/en.yml +0 -25
  108. data/lib/padrino-admin/locale/orm/es.yml +0 -25
  109. data/lib/padrino-admin/locale/orm/fr.yml +0 -25
  110. data/lib/padrino-admin/locale/orm/hu.yml +0 -25
  111. data/lib/padrino-admin/locale/orm/it.yml +0 -25
  112. data/lib/padrino-admin/locale/orm/ja.yml +0 -25
  113. data/lib/padrino-admin/locale/orm/lv.yml +0 -25
  114. data/lib/padrino-admin/locale/orm/nl.yml +0 -25
  115. data/lib/padrino-admin/locale/orm/no.yml +1 -26
  116. data/lib/padrino-admin/locale/orm/pt_br.yml +0 -25
  117. data/lib/padrino-admin/locale/orm/ro.yml +0 -25
  118. data/lib/padrino-admin/locale/orm/ru.yml +0 -25
  119. data/lib/padrino-admin/locale/orm/sv.yml +0 -25
  120. data/lib/padrino-admin/locale/orm/tr.yml +0 -25
  121. data/lib/padrino-admin/locale/orm/uk.yml +0 -25
  122. data/lib/padrino-admin/locale/orm/zh_cn.yml +0 -25
  123. data/lib/padrino-admin/locale/orm/zh_tw.yml +0 -25
  124. data/test/fixtures/data_mapper.rb +0 -41
  125. data/test/generators/test_admin_app_generator.rb +3 -6
  126. data/test/test_locale.rb +0 -33
  127. metadata +19 -14
  128. data/lib/padrino-admin/bootstrap-less/accordion.less +0 -31
  129. data/lib/padrino-admin/bootstrap-less/font-awesome-ie7.less +0 -1953
  130. data/lib/padrino-admin/bootstrap-less/font-awesome.less +0 -33
  131. data/lib/padrino-admin/bootstrap-less/font-awesome/bootstrap.less +0 -84
  132. data/lib/padrino-admin/bootstrap-less/font-awesome/extras.less +0 -93
  133. data/lib/padrino-admin/bootstrap-less/font-awesome/font-awesome-ie7.less +0 -1953
  134. data/lib/padrino-admin/generators/templates/assets/javascripts/jquery-1.9.0.min.js +0 -4
  135. data/lib/padrino-admin/utils/crypt.rb +0 -41
@@ -16,6 +16,7 @@
16
16
  padding: @padding-base-vertical @padding-base-horizontal;
17
17
  line-height: @line-height-base;
18
18
  text-decoration: none;
19
+ color: @pagination-color;
19
20
  background-color: @pagination-bg;
20
21
  border: 1px solid @pagination-border;
21
22
  margin-left: -1px;
@@ -39,7 +40,9 @@
39
40
  > li > span {
40
41
  &:hover,
41
42
  &:focus {
43
+ color: @pagination-hover-color;
42
44
  background-color: @pagination-hover-bg;
45
+ border-color: @pagination-hover-border;
43
46
  }
44
47
  }
45
48
 
@@ -51,19 +54,21 @@
51
54
  z-index: 2;
52
55
  color: @pagination-active-color;
53
56
  background-color: @pagination-active-bg;
54
- border-color: @pagination-active-bg;
57
+ border-color: @pagination-active-border;
55
58
  cursor: default;
56
59
  }
57
60
  }
58
61
 
59
62
  > .disabled {
60
63
  > span,
64
+ > span:hover,
65
+ > span:focus,
61
66
  > a,
62
67
  > a:hover,
63
68
  > a:focus {
64
69
  color: @pagination-disabled-color;
65
- background-color: @pagination-bg;
66
- border-color: @pagination-border;
70
+ background-color: @pagination-disabled-bg;
71
+ border-color: @pagination-disabled-border;
67
72
  cursor: not-allowed;
68
73
  }
69
74
  }
@@ -14,8 +14,8 @@
14
14
 
15
15
  // Panel contents
16
16
  .panel-body {
17
- padding: 15px;
18
- .clearfix();
17
+ padding: @panel-body-padding;
18
+ &:extend(.clearfix all);
19
19
  }
20
20
 
21
21
 
@@ -27,19 +27,28 @@
27
27
  .panel {
28
28
  > .list-group {
29
29
  margin-bottom: 0;
30
-
31
30
  .list-group-item {
32
31
  border-width: 1px 0;
33
-
34
- // Remove border radius for top one
32
+ border-radius: 0;
35
33
  &:first-child {
36
- .border-top-radius(0);
34
+ border-top: 0;
37
35
  }
38
- // But keep it for the last one
39
36
  &:last-child {
40
37
  border-bottom: 0;
41
38
  }
42
39
  }
40
+ // Add border top radius for first one
41
+ &:first-child {
42
+ .list-group-item:first-child {
43
+ .border-top-radius((@panel-border-radius - 1));
44
+ }
45
+ }
46
+ // Add border bottom radius for last one
47
+ &:last-child {
48
+ .list-group-item:last-child {
49
+ .border-bottom-radius((@panel-border-radius - 1));
50
+ }
51
+ }
43
52
  }
44
53
  }
45
54
  // Collapse space between when there's no additional content.
@@ -56,12 +65,82 @@
56
65
  // watch it go full width.
57
66
 
58
67
  .panel {
59
- > .table {
68
+ > .table,
69
+ > .table-responsive > .table {
60
70
  margin-bottom: 0;
61
71
  }
62
- > .panel-body + .table {
72
+ // Add border top radius for first one
73
+ > .table:first-child,
74
+ > .table-responsive:first-child > .table:first-child {
75
+ > thead:first-child,
76
+ > tbody:first-child {
77
+ > tr:first-child {
78
+ td:first-child,
79
+ th:first-child {
80
+ border-top-left-radius: (@panel-border-radius - 1);
81
+ }
82
+ td:last-child,
83
+ th:last-child {
84
+ border-top-right-radius: (@panel-border-radius - 1);
85
+ }
86
+ }
87
+ }
88
+ }
89
+ // Add border bottom radius for last one
90
+ > .table:last-child,
91
+ > .table-responsive:last-child > .table:last-child {
92
+ > tbody:last-child,
93
+ > tfoot:last-child {
94
+ > tr:last-child {
95
+ td:first-child,
96
+ th:first-child {
97
+ border-bottom-left-radius: (@panel-border-radius - 1);
98
+ }
99
+ td:last-child,
100
+ th:last-child {
101
+ border-bottom-right-radius: (@panel-border-radius - 1);
102
+ }
103
+ }
104
+ }
105
+ }
106
+ > .panel-body + .table,
107
+ > .panel-body + .table-responsive {
63
108
  border-top: 1px solid @table-border-color;
64
109
  }
110
+ > .table > tbody:first-child > tr:first-child th,
111
+ > .table > tbody:first-child > tr:first-child td {
112
+ border-top: 0;
113
+ }
114
+ > .table-bordered,
115
+ > .table-responsive > .table-bordered {
116
+ border: 0;
117
+ > thead,
118
+ > tbody,
119
+ > tfoot {
120
+ > tr {
121
+ > th:first-child,
122
+ > td:first-child {
123
+ border-left: 0;
124
+ }
125
+ > th:last-child,
126
+ > td:last-child {
127
+ border-right: 0;
128
+ }
129
+ &:first-child > th,
130
+ &:first-child > td {
131
+ border-top: 0;
132
+ }
133
+ &:last-child > th,
134
+ &:last-child > td {
135
+ border-bottom: 0;
136
+ }
137
+ }
138
+ }
139
+ }
140
+ > .table-responsive {
141
+ border: 0;
142
+ margin-bottom: 0;
143
+ }
65
144
  }
66
145
 
67
146
 
@@ -69,14 +148,20 @@
69
148
  .panel-heading {
70
149
  padding: 10px 15px;
71
150
  border-bottom: 1px solid transparent;
72
- .border-top-radius(@panel-border-radius - 1);
151
+ .border-top-radius((@panel-border-radius - 1));
152
+
153
+ > .dropdown .dropdown-toggle {
154
+ color: inherit;
155
+ }
73
156
  }
74
157
 
75
- // Within heading, strip any `h*` tag of it's default margins for spacing.
158
+ // Within heading, strip any `h*` tag of its default margins for spacing.
76
159
  .panel-title {
77
160
  margin-top: 0;
78
161
  margin-bottom: 0;
79
162
  font-size: ceil((@font-size-base * 1.125));
163
+ color: inherit;
164
+
80
165
  > a {
81
166
  color: inherit;
82
167
  }
@@ -87,7 +172,7 @@
87
172
  padding: 10px 15px;
88
173
  background-color: @panel-footer-bg;
89
174
  border-top: 1px solid @panel-inner-border;
90
- .border-bottom-radius(@panel-border-radius - 1);
175
+ .border-bottom-radius((@panel-border-radius - 1));
91
176
  }
92
177
 
93
178
 
@@ -97,6 +182,8 @@
97
182
  // the help of our collapse JavaScript plugin.
98
183
 
99
184
  .panel-group {
185
+ margin-bottom: @line-height-computed;
186
+
100
187
  // Tighten up margin so it's only between panels
101
188
  .panel {
102
189
  margin-bottom: 0;
@@ -119,11 +206,6 @@
119
206
  border-bottom: 1px solid @panel-inner-border;
120
207
  }
121
208
  }
122
-
123
- // New subcomponent for wrapping collapsable content for proper animations
124
- .panel-collapse {
125
-
126
- }
127
209
  }
128
210
 
129
211
 
@@ -137,12 +219,12 @@
137
219
  .panel-success {
138
220
  .panel-variant(@panel-success-border; @panel-success-text; @panel-success-heading-bg; @panel-success-border);
139
221
  }
222
+ .panel-info {
223
+ .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border);
224
+ }
140
225
  .panel-warning {
141
226
  .panel-variant(@panel-warning-border; @panel-warning-text; @panel-warning-heading-bg; @panel-warning-border);
142
227
  }
143
228
  .panel-danger {
144
229
  .panel-variant(@panel-danger-border; @panel-danger-text; @panel-danger-heading-bg; @panel-danger-border);
145
230
  }
146
- .panel-info {
147
- .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border);
148
- }
@@ -26,7 +26,6 @@
26
26
  }
27
27
 
28
28
  // Don't show links for images, or javascript/internal links
29
- .ir a:after,
30
29
  a[href^="javascript:"]:after,
31
30
  a[href^="#"]:after {
32
31
  content: "";
@@ -51,10 +50,6 @@
51
50
  max-width: 100% !important;
52
51
  }
53
52
 
54
- @page {
55
- margin: 2cm .5cm;
56
- }
57
-
58
53
  p,
59
54
  h2,
60
55
  h3 {
@@ -67,6 +62,12 @@
67
62
  page-break-after: avoid;
68
63
  }
69
64
 
65
+ // Chrome (OSX) fix for https://github.com/twbs/bootstrap/issues/11245
66
+ // Once fixed, we can just straight up remove this.
67
+ select {
68
+ background: #fff !important;
69
+ }
70
+
70
71
  // Bootstrap components
71
72
  .navbar {
72
73
  display: none;
@@ -6,24 +6,12 @@
6
6
  // Bar animations
7
7
  // -------------------------
8
8
 
9
- // Webkit
9
+ // WebKit
10
10
  @-webkit-keyframes progress-bar-stripes {
11
11
  from { background-position: 40px 0; }
12
12
  to { background-position: 0 0; }
13
13
  }
14
14
 
15
- // Firefox
16
- @-moz-keyframes progress-bar-stripes {
17
- from { background-position: 40px 0; }
18
- to { background-position: 0 0; }
19
- }
20
-
21
- // Opera
22
- @-o-keyframes progress-bar-stripes {
23
- from { background-position: 0 0; }
24
- to { background-position: 40px 0; }
25
- }
26
-
27
15
  // Spec and IE10+
28
16
  @keyframes progress-bar-stripes {
29
17
  from { background-position: 40px 0; }
@@ -51,6 +39,7 @@
51
39
  width: 0%;
52
40
  height: 100%;
53
41
  font-size: @font-size-small;
42
+ line-height: @line-height-computed;
54
43
  color: @progress-bar-color;
55
44
  text-align: center;
56
45
  background-color: @progress-bar-bg;
@@ -60,17 +49,13 @@
60
49
 
61
50
  // Striped bars
62
51
  .progress-striped .progress-bar {
63
- #gradient > .striped(@progress-bar-bg);
52
+ #gradient > .striped();
64
53
  background-size: 40px 40px;
65
54
  }
66
55
 
67
56
  // Call animation for the active one
68
57
  .progress.active .progress-bar {
69
- -webkit-animation: progress-bar-stripes 2s linear infinite;
70
- -moz-animation: progress-bar-stripes 2s linear infinite;
71
- -ms-animation: progress-bar-stripes 2s linear infinite;
72
- -o-animation: progress-bar-stripes 2s linear infinite;
73
- animation: progress-bar-stripes 2s linear infinite;
58
+ .animation(progress-bar-stripes 2s linear infinite);
74
59
  }
75
60
 
76
61
 
@@ -3,218 +3,91 @@
3
3
  // --------------------------------------------------
4
4
 
5
5
 
6
- // IE10 Metro responsive
7
- // Required for Windows 8 Metro split-screen snapping with IE10
6
+ // IE10 in Windows (Phone) 8
8
7
  //
9
- // Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/
10
- @-ms-viewport{
11
- width: device-width;
12
- }
13
-
14
- // IE10 on Windows Phone 8
15
- // IE10 on WP8 doesn't report CSS pixels, but actual device pixels. In
16
- // other words, say on a Lumia, you'll get 768px as the device width,
17
- // meaning users will see the tablet styles and not phone styles.
8
+ // Support for responsive views via media queries is kind of borked in IE10, for
9
+ // Surface/desktop in split view and for Windows Phone 8. This particular fix
10
+ // must be accompanied by a snippet of JavaScript to sniff the user agent and
11
+ // apply some conditional CSS to *only* the Surface/desktop Windows 8. Look at
12
+ // our Getting Started page for more information on this bug.
18
13
  //
19
- // Alternatively you can override this with JS (see source below), but
20
- // we won't be doing that here given our limited scope.
14
+ // For more information, see the following:
21
15
  //
22
- // Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/
23
- @media screen and (max-width: 400px) {
24
- @-ms-viewport{
25
- width: 320px;
26
- }
27
- }
16
+ // Issue: https://github.com/twbs/bootstrap/issues/10497
17
+ // Docs: http://getbootstrap.com/getting-started/#browsers
18
+ // Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/
28
19
 
29
- // Hide from screenreaders and browsers
30
- // Credit: HTML5 Boilerplate
31
- .hidden {
32
- display: none !important;
33
- visibility: hidden !important;
20
+ @-ms-viewport {
21
+ width: device-width;
34
22
  }
35
23
 
36
- // Visibility utilities
37
24
 
25
+ // Visibility utilities
38
26
  .visible-xs {
39
27
  .responsive-invisibility();
28
+
40
29
  @media (max-width: @screen-xs-max) {
41
30
  .responsive-visibility();
42
31
  }
43
- &.visible-sm {
44
- @media (min-width: @screen-sm) and (max-width: @screen-sm-max) {
45
- .responsive-visibility();
46
- }
47
- }
48
- &.visible-md {
49
- @media (min-width: @screen-md) and (max-width: @screen-md-max) {
50
- .responsive-visibility();
51
- }
52
- }
53
- &.visible-lg {
54
- @media (min-width: @screen-lg) {
55
- .responsive-visibility();
56
- }
57
- }
58
32
  }
59
33
  .visible-sm {
60
34
  .responsive-invisibility();
61
- &.visible-xs {
62
- @media (max-width: @screen-xs-max) {
63
- .responsive-visibility();
64
- }
65
- }
66
- @media (min-width: @screen-sm) and (max-width: @screen-sm-max) {
35
+
36
+ @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
67
37
  .responsive-visibility();
68
38
  }
69
- &.visible-md {
70
- @media (min-width: @screen-md) and (max-width: @screen-md-max) {
71
- .responsive-visibility();
72
- }
73
- }
74
- &.visible-lg {
75
- @media (min-width: @screen-lg) {
76
- .responsive-visibility();
77
- }
78
- }
79
39
  }
80
40
  .visible-md {
81
41
  .responsive-invisibility();
82
- &.visible-xs {
83
- @media (max-width: @screen-xs-max) {
84
- .responsive-visibility();
85
- }
86
- }
87
- &.visible-sm {
88
- @media (min-width: @screen-sm) and (max-width: @screen-sm-max) {
89
- .responsive-visibility();
90
- }
91
- }
92
- @media (min-width: @screen-md) and (max-width: @screen-md-max) {
42
+
43
+ @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
93
44
  .responsive-visibility();
94
45
  }
95
- &.visible-lg {
96
- @media (min-width: @screen-lg) {
97
- .responsive-visibility();
98
- }
99
- }
100
46
  }
101
47
  .visible-lg {
102
48
  .responsive-invisibility();
103
- &.visible-xs {
104
- @media (max-width: @screen-xs-max) {
105
- .responsive-visibility();
106
- }
107
- }
108
- &.visible-sm {
109
- @media (min-width: @screen-sm) and (max-width: @screen-sm-max) {
110
- .responsive-visibility();
111
- }
112
- }
113
- &.visible-md {
114
- @media (min-width: @screen-md) and (max-width: @screen-md-max) {
115
- .responsive-visibility();
116
- }
117
- }
118
- @media (min-width: @screen-lg) {
49
+
50
+ @media (min-width: @screen-lg-min) {
119
51
  .responsive-visibility();
120
52
  }
121
53
  }
122
54
 
123
55
  .hidden-xs {
124
- .responsive-visibility();
125
56
  @media (max-width: @screen-xs-max) {
126
57
  .responsive-invisibility();
127
58
  }
128
- &.hidden-sm {
129
- @media (min-width: @screen-sm) and (max-width: @screen-sm-max) {
130
- .responsive-invisibility();
131
- }
132
- }
133
- &.hidden-md {
134
- @media (min-width: @screen-md) and (max-width: @screen-md-max) {
135
- .responsive-invisibility();
136
- }
137
- }
138
- &.hidden-lg {
139
- @media (min-width: @screen-lg) {
140
- .responsive-invisibility();
141
- }
142
- }
143
59
  }
144
60
  .hidden-sm {
145
- .responsive-visibility();
146
- &.hidden-xs {
147
- @media (max-width: @screen-xs-max) {
148
- .responsive-invisibility();
149
- }
150
- }
151
- @media (min-width: @screen-sm) and (max-width: @screen-sm-max) {
61
+ @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
152
62
  .responsive-invisibility();
153
63
  }
154
- &.hidden-md {
155
- @media (min-width: @screen-md) and (max-width: @screen-md-max) {
156
- .responsive-invisibility();
157
- }
158
- }
159
- &.hidden-lg {
160
- @media (min-width: @screen-lg) {
161
- .responsive-invisibility();
162
- }
163
- }
164
64
  }
165
65
  .hidden-md {
166
- .responsive-visibility();
167
- &.hidden-xs {
168
- @media (max-width: @screen-xs-max) {
169
- .responsive-invisibility();
170
- }
171
- }
172
- &.hidden-sm {
173
- @media (min-width: @screen-sm) and (max-width: @screen-sm-max) {
174
- .responsive-invisibility();
175
- }
176
- }
177
- @media (min-width: @screen-md) and (max-width: @screen-md-max) {
66
+ @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
178
67
  .responsive-invisibility();
179
68
  }
180
- &.hidden-lg {
181
- @media (min-width: @screen-lg) {
182
- .responsive-invisibility();
183
- }
184
- }
185
69
  }
186
70
  .hidden-lg {
187
- .responsive-visibility();
188
- &.hidden-xs {
189
- @media (max-width: @screen-xs-max) {
190
- .responsive-invisibility();
191
- }
192
- }
193
- &.hidden-sm {
194
- @media (min-width: @screen-sm) and (max-width: @screen-sm-max) {
195
- .responsive-invisibility();
196
- }
197
- }
198
- &.hidden-md {
199
- @media (min-width: @screen-md) and (max-width: @screen-md-max) {
200
- .responsive-invisibility();
201
- }
202
- }
203
- @media (min-width: @screen-lg) {
71
+ @media (min-width: @screen-lg-min) {
204
72
  .responsive-invisibility();
205
73
  }
206
74
  }
207
75
 
76
+
208
77
  // Print utilities
78
+ //
79
+ // Media queries are placed on the inside to be mixin-friendly.
80
+
209
81
  .visible-print {
210
82
  .responsive-invisibility();
211
- }
212
83
 
213
- @media print {
214
- .visible-print {
84
+ @media print {
215
85
  .responsive-visibility();
216
86
  }
217
- .hidden-print {
87
+ }
88
+
89
+ .hidden-print {
90
+ @media print {
218
91
  .responsive-invisibility();
219
92
  }
220
93
  }