aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-05-31 09:09:43 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-05-31 15:36:08 +0100
commit54988561abba0ffdb44cc0baf0c2042ba9770b18 (patch)
treefe5faa225e297f460f35a1b3f9e16e159559c074 /web
parent38e2918987677253b6a337f5287c2e29685b9c78 (diff)
Consolidate CSS clearfix handling.
Remove duplicate/alternate definitions, and settle on the name clearfix.
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/eastsussex/layout.scss7
-rw-r--r--web/cobrands/fixmystreet.com/base.scss6
-rw-r--r--web/cobrands/greenwich/layout.scss7
-rw-r--r--web/cobrands/hart/hart.scss8
-rw-r--r--web/cobrands/sass/_dropzone.scss2
-rw-r--r--web/cobrands/sass/_h5bp.scss8
-rw-r--r--web/cobrands/sass/_mixins.scss14
7 files changed, 10 insertions, 42 deletions
diff --git a/web/cobrands/eastsussex/layout.scss b/web/cobrands/eastsussex/layout.scss
index d90a617f1..20be807a6 100644
--- a/web/cobrands/eastsussex/layout.scss
+++ b/web/cobrands/eastsussex/layout.scss
@@ -1,13 +1,6 @@
@import "_colours";;
@import "../sass/layout";
-/* from http://nicolasgallagher.com/micro-clearfix-hack/ */
-.clearfix:before,
-.clearfix:after { content: " "; display: table; }
-.clearfix:after { clear: both; }
-/* For IE 6/7 only */
-.clearfix { *zoom: 1; }
-
#front-main {
// Undo the top margin added in base.scss
margin-top: 0;
diff --git a/web/cobrands/fixmystreet.com/base.scss b/web/cobrands/fixmystreet.com/base.scss
index 8e52bc853..366ebc451 100644
--- a/web/cobrands/fixmystreet.com/base.scss
+++ b/web/cobrands/fixmystreet.com/base.scss
@@ -73,7 +73,7 @@
}
.next-steps__step__cta {
- @include pie-clearfix;
+ @include clearfix;
padding-top: 0.4em; // extra padding between buttons and previous paragraph
a {
@@ -97,7 +97,7 @@
}
.next-steps__step--goodies {
- @include pie-clearfix;
+ @include clearfix;
.goodies-preview {
float: $right;
@@ -286,7 +286,7 @@ $grid-breakpoint-sm: $mysoc-footer-breakpoint-sm;
}
.row {
- @include clearfix();
+ @include clearfix;
margin-left: $grid-gutter / -2;
margin-right: $grid-gutter / -2;
}
diff --git a/web/cobrands/greenwich/layout.scss b/web/cobrands/greenwich/layout.scss
index eff3f854e..a60313de3 100644
--- a/web/cobrands/greenwich/layout.scss
+++ b/web/cobrands/greenwich/layout.scss
@@ -5,13 +5,6 @@
$fixed_page_width: 990px;
-/* from http://nicolasgallagher.com/micro-clearfix-hack/ */
-.clearfix:before, .clearfix:after { content: " "; display: table; }
-.clearfix:after { clear: both; }
-/* For IE 6/7 only */
-.clearfix { *zoom: 1; }
-
-
#site-logo,
.ie6 #site-logo,
body.frontpage #site-logo,
diff --git a/web/cobrands/hart/hart.scss b/web/cobrands/hart/hart.scss
index e7f80d14b..ac833934d 100644
--- a/web/cobrands/hart/hart.scss
+++ b/web/cobrands/hart/hart.scss
@@ -7,14 +7,6 @@
@import "../sass/mixins";
@import "_colours";
-/* from http://nicolasgallagher.com/micro-clearfix-hack/ */
-.clearfix:before,
-.clearfix:after { content: " "; display: table; }
-.clearfix:after { clear: both; }
-/* For IE 6/7 only */
-.clearfix { *zoom: 1; }
-
-
// Taken from Bromley's form css
input[type=text],
input[type=password],
diff --git a/web/cobrands/sass/_dropzone.scss b/web/cobrands/sass/_dropzone.scss
index 8c482d0cf..3e5fc8058 100644
--- a/web/cobrands/sass/_dropzone.scss
+++ b/web/cobrands/sass/_dropzone.scss
@@ -9,7 +9,7 @@ $dropzone-background-color--awakened: mix($dropzone-link-color, $dropzone-backgr
$dropzone-background-color--full: mix($dropzone-border-color--full, $dropzone-background-color, 10%);
.dropzone {
- @include clearfix();
+ @include clearfix;
border: 0.125em solid $dropzone-border-color;
background-color: $dropzone-background-color;
border-radius: $dropzone-border-radius;
diff --git a/web/cobrands/sass/_h5bp.scss b/web/cobrands/sass/_h5bp.scss
index f2074532c..b41effa1b 100644
--- a/web/cobrands/sass/_h5bp.scss
+++ b/web/cobrands/sass/_h5bp.scss
@@ -247,11 +247,9 @@ td { vertical-align: top; }
.invisible { visibility: hidden; }
/* Contain floats: h5bp.com/q */
-/* mySociety change: rename to cf */
-.cf:before, .cf:after { content: ""; display: table; }
-.cf:after { clear: both; }
-.cf { *zoom: 1; }
-
+.clearfix:before, .clearfix:after { content: " "; display: table; }
+.clearfix:after { clear: both; }
+.clearfix { *zoom: 1; }
/* ==|== print styles =======================================================
diff --git a/web/cobrands/sass/_mixins.scss b/web/cobrands/sass/_mixins.scss
index 294b69c8a..71f9b95a3 100644
--- a/web/cobrands/sass/_mixins.scss
+++ b/web/cobrands/sass/_mixins.scss
@@ -92,17 +92,9 @@ $right: right;
}
@mixin clearfix {
- overflow: hidden;
- *zoom: 1;
-}
-
-@mixin pie-clearfix {
- &:after {
- content: "";
- display: table;
- clear: both;
- }
- *zoom: 1;
+ &:before, &:after { content: " "; display: table; }
+ &:after { clear: both; }
+ & { *zoom: 1; }
}
@mixin linear-gradient($stops...) {