summaryrefslogtreecommitdiff
path: root/www/lib/ionic/scss/_scaffolding.scss
blob: 4c768c9f5fc3451d8472554a74369cb2fdd0db3c (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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269

/**
 * Scaffolding
 * --------------------------------------------------
 */

*,
*:before,
*:after {
  @include box-sizing(border-box);
}

html {
  overflow: hidden;
  -ms-touch-action: pan-y;
  touch-action: pan-y;
}

body,
.ionic-body {
  @include touch-callout(none);
  @include font-smoothing(antialiased);
  @include text-size-adjust(none);
  @include tap-highlight-transparent();
  @include user-select(none);

  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;

  margin: 0;
  padding: 0;

  color: $base-color;
  word-wrap: break-word;
  font-size: $font-size-base;
  font-family: $font-family-base;
  line-height: $line-height-computed;
  text-rendering: optimizeLegibility;
  -webkit-backface-visibility: hidden;
  -webkit-user-drag: none;
  -ms-content-zooming: none;
}

body.grade-b,
body.grade-c {
  // disable optimizeLegibility for low end devices
  text-rendering: auto;
}

.content {
  // used for content areas not using the content directive
  position: relative;
}

.scroll-content {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;

  // Hide the top border if any
  margin-top: -1px;

  // Prevents any distortion of lines
  padding-top: 1px;
  margin-bottom: -1px;

  width: auto;
  height: auto;
}

.menu .scroll-content.scroll-content-false{
  z-index: $z-index-scroll-content-false;
}

.scroll-view {
  position: relative;
  display: block;
  overflow: hidden;

  // Hide the top border if any
  margin-top: -1px;
}

/**
 * Scroll is the scroll view component available for complex and custom
 * scroll view functionality.
 */
.scroll {
  @include user-select(none);
  @include touch-callout(none);
  @include text-size-adjust(none);
  @include transform-origin(left, top);
}
/**
 * Set ms-viewport to prevent MS "page squish" and allow fluid scrolling
 * https://msdn.microsoft.com/en-us/library/ie/hh869615(v=vs.85).aspx
 */
@-ms-viewport { width: device-width; }

// Scroll bar styles
.scroll-bar {
  position: absolute;
  z-index: $z-index-scroll-bar;
}
// hide the scroll-bar during animations
.ng-animate .scroll-bar {
  visibility: hidden;
}
.scroll-bar-h {
  right: 2px;
  bottom: 3px;
  left: 2px;
  height: 3px;

  .scroll-bar-indicator {
    height: 100%;
  }
}

.scroll-bar-v {
  top: 2px;
  right: 3px;
  bottom: 2px;
  width: 3px;

  .scroll-bar-indicator {
    width: 100%;
  }
}
.scroll-bar-indicator {
  position: absolute;
  border-radius: 4px;
  background: rgba(0,0,0,0.3);
  opacity: 1;
  @include transition(opacity .3s linear);

  &.scroll-bar-fade-out {
    opacity: 0;
  }
}
.platform-android .scroll-bar-indicator {
  // android doesn't have rounded ends on scrollbar
  border-radius: 0;
}
.grade-b .scroll-bar-indicator,
.grade-c .scroll-bar-indicator {
  // disable rgba background and border radius for low end devices
  background: #aaa;

  &.scroll-bar-fade-out {
    @include transition(none);
  }
}

ion-infinite-scroll {
  height: 60px;
  width: 100%;
  display: block;

  @include display-flex();
  @include flex-direction(row);
  @include justify-content(center);
  @include align-items(center);

  .icon {
    color: #666666;
    font-size: 30px;
    color: $scroll-refresh-icon-color;
  }
  &:not(.active){
    .spinner,
    .icon:before{
      display:none;
    }
  }
}

.overflow-scroll {
  overflow-x: hidden;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  position: absolute;

  .scroll {
    position: static;
    height: 100%;
    -webkit-transform: translate3d(0, 0, 0);   // fix iOS bug where relative children of scroller disapear while scrolling.  see: http://stackoverflow.com/questions/9807620/ipad-safari-scrolling-causes-html-elements-to-disappear-and-reappear-with-a-dela
  }
}


// Pad top/bottom of content so it doesn't hide behind .bar-title and .bar-tab.
// Note: For these to work, content must come after both bars in the markup
/* If you change these, change platform.scss as well */
.has-header {
  top: $bar-height;
}
// Force no header
.no-header {
  top: 0;
}

.has-subheader {
  top: $bar-height + $bar-subheader-height;
}
.has-tabs-top {
  top: $bar-height + $tabs-height;
}
.has-header.has-subheader.has-tabs-top {
  top: $bar-height + $bar-subheader-height + $tabs-height;
}

.has-footer {
  bottom: $bar-footer-height;
}
.has-subfooter {
  bottom: $bar-footer-height + $bar-subfooter-height;
}

.has-tabs,
.bar-footer.has-tabs {
  bottom: $tabs-height;
  &.pane{
    bottom: $tabs-height;
    height:auto;
  }
}

.has-footer.has-tabs {
  bottom: $tabs-height + $bar-footer-height;
}

// A full screen section with a solid background
.pane {
  @include translate3d(0,0,0);
  @include transition-duration(0);
  z-index: $z-index-pane;
}
.view {
  z-index: $z-index-view;
}
.pane,
.view {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: $base-background-color;
  overflow: hidden;
}
.view-container {
  position: absolute;
  display: block;
  width: 100%;
  height: 100%;
}