Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Replace #root_footer with :after pseudo-element #986

wants to merge 2 commits into from

5 participants


We can remove the extra markup element and have a cleaner HTML structure.
The downside is that a user-defined pseudo-element of the #root can interfere with the sticky-footer one.


Maybe better to set #root_footer as :after by default, allowing people to set another element (to support IE7 ?)


This is a good idea. However we will still need to add the content: ""; display: block; stuff for this to work.

@krulik krulik Replace root_footer-selector to &:after by default
A less obtrusive way to replace the extra markup element.

Well the "support for IE7" variable could be used no ?


I think so.


I don't think you need anything explicit for IE7 - now it's :after by default but you can still overwrite it if you want to. It also doesn't break the mixin signature this way, much less obtrusive.


I like this, but I think it belongs in the master branch, not the stable branch. It should also be documented, with tests, and added to the changelog. This is likely to affect everyone using the mixin, so we can't do it without warning.


@ericam Fair, I'm new here and I feel that I need some contribution guidelines. Where can I find some? I've looked in the Wiki and the website and didn't find anything like that. How do I document/test/changelog? What branches are for what purpose? Sorry for n00b questions :)


@krulik No worries. The contribution guidelines are on the site:

Let me know if you have more questions. Thanks for the contribution!


Closing due to lack of updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 9, 2012
  1. @krulik
  2. @krulik

    Replace root_footer-selector to &:after by default

    krulik authored
    A less obtrusive way to replace the extra markup element.
This page is out of date. Refresh to see the latest.
4 frameworks/compass/stylesheets/compass/layout/_sticky-footer.scss
@@ -6,7 +6,7 @@
// Footer must be a fixed height.
-@mixin sticky-footer($footer-height, $root-selector: unquote("#root"), $root-footer-selector: unquote("#root_footer"), $footer-selector: unquote("#footer")) {
+@mixin sticky-footer($footer-height, $root-selector: unquote("#root"), $root-footer-selector: unquote("&:after"), $footer-selector: unquote("#footer")) {
html, body {
height: 100%; }
#{$root-selector} {
@@ -16,6 +16,8 @@
height: 100%;
margin-bottom: -$footer-height;
#{$root-footer-selector} {
+ content: "";
+ display: block;
height: $footer-height; } }
#{$footer-selector} {
clear: both;
Something went wrong with that request. Please try again.