aboutsummaryrefslogtreecommitdiff
path: root/contexts/data/lib/closure-library/closure/css/inlay/g-ratio.css
blob: 6017ec086396ad0bb4cd897a72cad5d76a8e7fda (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
/*
 * Copyright 2007 The Closure Library Authors. All Rights Reserved.
 *
 * Use of this source code is governed by the Apache License, Version 2.0.
 * See the COPYING file for details.
 */

/**
 * CSS Inlay
 * Percentage based templates
 * @author ddiaz@google.com (Dustin Diaz)
 * @author elsigh@google.com (Lindsey Simon)
 * @fileoverview
 * The first ten templates are described using the following convention:
 * tpl-LEFT%-RIGHT% and tpl-LEFT%-RIGHT%-alt, where alt switches render order.
 *
 * The rationale for the percentage values are pretty fascinating.
 * Three nine's are needed for a miminal affordance in the gap between units
 * for Opera, while two for IE 5.5 and down.
 * Straight percentages seem to work fine otherwise, but the values here test
 * well cross-browser.
 *
 * Sample Usage:
  <div class="g-section g-tpl-50-50">
    <div class="g-unit g-first">
      <p>
        Lorem Ipsum...
      </p>
    </div>
    <div class="g-unit">
      <p>
        Lorem Ipsum...
      </p>
    </div>
  </div>
 */

/* 25/75 */
.g-tpl-25-75 .g-unit,
.g-unit .g-tpl-25-75 .g-unit,
.g-unit .g-unit .g-tpl-25-75 .g-unit,
.g-unit .g-unit .g-unit .g-tpl-25-75 .g-unit {
  width: 74.999%;
  float: right;
  margin: 0;
}
.g-unit .g-unit .g-unit .g-tpl-25-75 .g-first,
.g-unit .g-unit .g-tpl-25-75 .g-first,
.g-unit .g-tpl-25-75 .g-first,
.g-tpl-25-75 .g-first {
  width: 24.999%;
  float: left;
  margin: 0;
}

/* 25/75-alt */
.g-tpl-25-75-alt .g-unit,
.g-unit .g-tpl-25-75-alt .g-unit,
.g-unit .g-unit .g-tpl-25-75-alt .g-unit,
.g-unit .g-unit .g-unit .g-tpl-25-75-alt .g-unit {
  width: 24.999%;
  float: left;
  margin: 0;
}
.g-unit .g-unit .g-unit .g-tpl-25-75-alt .g-first,
.g-unit .g-unit .g-tpl-25-75-alt .g-first,
.g-unit .g-tpl-25-75-alt .g-first,
.g-tpl-25-75-alt .g-first {
  width: 74.999%;
  float: right;
  margin: 0;
}

/* 75/25 */
.g-tpl-75-25 .g-unit,
.g-unit .g-tpl-75-25 .g-unit,
.g-unit .g-unit .g-tpl-75-25 .g-unit,
.g-unit .g-unit .g-unit .g-tpl-75-25 .g-unit {
  width: 24.999%;
  float: right;
  margin: 0;
}
.g-unit .g-unit .g-unit .g-tpl-75-25 .g-first,
.g-unit .g-unit .g-tpl-75-25 .g-first,
.g-unit .g-tpl-75-25 .g-first,
.g-tpl-75-25 .g-first {
  width: 74.999%;
  float: left;
  margin: 0;
}

/* 75/25-alt */
.g-tpl-75-25-alt .g-unit,
.g-unit .g-tpl-75-25-alt .g-unit,
.g-unit .g-unit .g-tpl-75-25-alt .g-unit,
.g-unit .g-unit .g-unit .g-tpl-75-25-alt .g-unit {
  width: 74.999%;
  float: left;
  margin: 0;
}
.g-unit .g-unit .g-unit .g-tpl-75-25-alt .g-first,
.g-unit .g-unit .g-tpl-75-25-alt .g-first,
.g-unit .g-tpl-75-25-alt .g-first,
.g-tpl-75-25-alt .g-first {
  width: 24.999%;
  float: right;
  margin: 0;
}

/* 33/67 */
.g-tpl-33-67  .g-unit,
.g-unit .g-tpl-33-67  .g-unit,
.g-unit .g-unit .g-tpl-33-67  .g-unit,
.g-unit .g-unit .g-unit .g-tpl-33-67  .g-unit {
  width: 66.999%;
  float: right;
  margin: 0;
}
.g-unit .g-unit .g-unit .g-tpl-33-67 .g-first,
.g-unit .g-unit .g-tpl-33-67 .g-first,
.g-unit .g-tpl-33-67 .g-first,
.g-tpl-33-67 .g-first {
  width: 32.999%;
  float: left;
  margin: 0;
}

/* 33/67-alt */
.g-tpl-33-67-alt .g-unit,
.g-unit .g-tpl-33-67-alt .g-unit,
.g-unit .g-unit .g-tpl-33-67-alt .g-unit,
.g-unit .g-unit .g-unit .g-tpl-33-67-alt .g-unit {
  width: 32.999%;
  float: left;
  margin: 0;
}
.g-unit .g-unit .g-unit .g-tpl-33-67-alt .g-first,
.g-unit .g-unit .g-tpl-33-67-alt .g-first,
.g-unit .g-tpl-33-67-alt .g-first,
.g-tpl-33-67-alt .g-first {
  width: 66.999%;
  float: right;
  margin: 0;
}
/* 67/33 */
.g-tpl-67-33 .g-unit,
.g-unit .g-tpl-67-33 .g-unit,
.g-unit .g-unit .g-tpl-67-33 .g-unit,
.g-unit .g-unit .g-unit .g-tpl-67-33 .g-unit {
  width: 32.999%;
  float: right;
  margin: 0;
}
.g-unit .g-unit .g-unit .g-tpl-67-33 .g-first,
.g-unit .g-unit .g-tpl-67-33 .g-first,
.g-unit .g-tpl-67-33 .g-first,
.g-tpl-67-33 .g-first {
  width: 66.999%;
  float: left;
  margin: 0;
}

/* 67/33-alt */
.g-tpl-67-33-alt .g-unit,
.g-unit .g-tpl-67-33-alt .g-unit,
.g-unit .g-unit .g-tpl-67-33-alt .g-unit,
.g-unit .g-unit .g-unit .g-tpl-67-33-alt .g-unit {
  width: 66.999%;
  float: left;
  margin: 0;
}
.g-unit .g-unit .g-unit .g-tpl-67-33-alt .g-first,
.g-unit .g-unit .g-tpl-67-33-alt .g-first,
.g-unit .g-tpl-67-33-alt .g-first,
.g-tpl-67-33-alt .g-first {
  width: 32.999%;
  float: right;
  margin: 0;
}

/* 50/50 */
.g-tpl-50-50 .g-unit,
.g-unit .g-tpl-50-50 .g-unit,
.g-unit .g-unit .g-tpl-50-50 .g-unit,
.g-unit .g-unit .g-unit .g-tpl-50-50 .g-unit {
  width: 49.999%;
  float: right;
  margin: 0;
}
.g-unit .g-unit .g-unit .g-tpl-50-50 .g-first,
.g-unit .g-unit .g-tpl-50-50 .g-first,
.g-unit .g-tpl-50-50 .g-first,
.g-tpl-50-50 .g-first {
  width: 49.999%;
  float: left;
  margin: 0;
}

/* 50/50-alt */
.g-tpl-50-50-alt .g-unit,
.g-unit .g-tpl-50-50-alt .g-unit,
.g-unit .g-unit .g-tpl-50-50-alt .g-unit,
.g-unit .g-unit .g-unit .g-tpl-50-50-alt .g-unit {
  width: 49.999%;
  float: left;
  margin: 0;
}
.g-unit .g-unit .g-unit .g-tpl-50-50-alt .g-first,
.g-unit .g-unit .g-tpl-50-50-alt .g-first,
.g-unit .g-tpl-50-50-alt .g-first,
.g-tpl-50-50-alt .g-first {
  width: 49.999%;
  float: right;
  margin: 0;
}

/**
 * Nest templates contain floating g-units.
 * For these, width needs to be reset from the 100% for inline-block
 * to auto. This fixes an issue with horizontal scrollbars.
 */
.g-tpl-nest {
  width: auto;
}
/**
 * Making any g-sections inside of g-tpl-nests display inline instead
 * of display block solves an issue where inner sections add up incrementally
 * their widths to set the width of the outer g-unit. This causes all kinds of
 * problems with float-drops and display:inline fixes this.
 */
.g-tpl-nest .g-section {
  display: inline;
}

/* g-tpl-nest for multi unit nesting (float left), say for a menu. */
.g-tpl-nest .g-unit,
.g-unit .g-tpl-nest .g-unit,
.g-unit .g-unit .g-tpl-nest .g-unit,
.g-unit .g-unit .g-unit .g-tpl-nest .g-unit {
  float: left;
  width: auto;
  margin: 0;
}

/* g-tpl-nest-alt for multi unit nesting (float right), say for a menu. */
.g-tpl-nest-alt .g-unit,
.g-unit .g-tpl-nest-alt .g-unit,
.g-unit .g-unit .g-tpl-nest-alt .g-unit,
.g-unit .g-unit .g-unit .g-tpl-nest-alt .g-unit {
  float: right;
  width: auto;
  margin: 0;
}