イナヅマTVログ

Memo, Sass+Compassでclearfix

| 0件のコメント

【メモ】
Sass+Compassでclearfix

Scss

@import "compass/utilities/general/clearfix";
 
.clearfix {
	@include clearfix;
}
.legacy-clearfix {
	@include legacy-pie-clearfix;
}
.pie-clearfix {
	@include pie-clearfix;
}

CSS

.clearfix {
  overflow: hidden;
  *zoom: 1;
}
 
/** legacy-pie-clearfix */
.legacy-clearfix {
  *zoom: 1;
}
.legacy-clearfix:after {
  content: "\0020";
  display: block;
  height: 0;
  clear: both;
  overflow: hidden;
  visibility: hidden;
}
 
/** pie-clearfix */
.pie-clearfix {
  *zoom: 1;
}
.pie-clearfix:after {
  content: "";
  display: table;
  clear: both;
}

overflow: hidden;加えたら:afterいらないってこと?

overflow: hidden;がまずい場合はpie-系使うで良い?

コメントを残す