Skip to content

Commit 06ccfd6

Browse files
committed
Merge branch 'better-clearfix'
2 parents 3a58778 + aab643c commit 06ccfd6

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

build-css.py

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,18 @@
144144
'/*',
145145
' * contain rows of columns',
146146
' */',
147-
'.row {',
148-
' zoom: 1;',
149-
' overflow: hidden;',
147+
'.row:after {',
148+
' content: ".";',
149+
' display: block;',
150+
' height: 0;',
151+
' clear: both;',
152+
' visibility: hidden;',
153+
'}',
154+
'html.ie7 .row {',
155+
' display: inline-block;',
156+
'}',
157+
'html.ie6 .row {',
158+
' height: 1%;',
150159
'}',
151160
'',
152161
]
@@ -404,14 +413,14 @@ def get_number_word(num):
404413
' */',
405414
]
406415
for line in breakpoint_output:
407-
ie_output.append(re.sub(r'^\t', '', line.replace('.%s' % container_class, '.%s .%s' % (opts.ie_fallback_class, container_class))))
416+
ie_output.append(re.sub(r'^\t', '', line.replace('.%s' % container_class, 'html.%s .%s' % (opts.ie_fallback_class, container_class))))
408417
if breakpoint >= minimum_container_with_columns:
409-
ie_output.append('.%s .%s .%s {' % (opts.ie_fallback_class, (container_class + '.' + breakpoint_suffix if len(breakpoint_suffix) else container_class), column_class))
418+
ie_output.append('html.%s .%s .%s {' % (opts.ie_fallback_class, (container_class + '.' + breakpoint_suffix if len(breakpoint_suffix) else container_class), column_class))
410419
ie_output.append('\tfloat: left;')
411420
ie_output.append('\tmargin-left: %dpx;' % opts.gutter_width)
412421
ie_output.append('}')
413-
ie_output.append('.%s .%s .%s:first-child,' % (opts.ie_fallback_class, (container_class + '.' + breakpoint_suffix if len(breakpoint_suffix) else container_class), column_class))
414-
ie_output.append('.%s .%s .%s.first {' % (opts.ie_fallback_class, (container_class + '.' + breakpoint_suffix if len(breakpoint_suffix) else container_class), column_class))
422+
ie_output.append('html.%s .%s .%s:first-child,' % (opts.ie_fallback_class, (container_class + '.' + breakpoint_suffix if len(breakpoint_suffix) else container_class), column_class))
423+
ie_output.append('html.%s .%s .%s.first {' % (opts.ie_fallback_class, (container_class + '.' + breakpoint_suffix if len(breakpoint_suffix) else container_class), column_class))
415424
ie_output.append('\tmargin-left: 0;')
416425
ie_output.append('}')
417426

0 commit comments

Comments
 (0)