1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed .pageNavLinkGroup -> enable better clearfix

Discussion in 'Resolved Bug Reports' started by CyberAP, Mar 31, 2013.

  1. CyberAP

    CyberAP Well-Known Member

    Current clearfix in .pageNavLinkGroup cuts the box-shadow of the button.

    This is caused by a "dirty" clearfix using overflow: hidden;

    I suggest to replace it with a pseudo-element clearfix, that is wisely used in discussion view for example.
    So the code will be:

    .pageNavLinkGroup:after
    {
    content: "";
    display: block;
    clear: both;
    visibility: hidden;
    }

    To compare:

    1.PNG
    Dirty clearfix

    2.PNG

    A better one, pesudo-element clearfix.
     
    Alien, Adam Howard, dutchbb and 2 others like this.
  2. dutchbb

    dutchbb Well-Known Member

    I noticed this before but forgot about it.
     
  3. Mike

    Mike XenForo Developer Staff Member

    The problem is that clear fix triggers clear: both, so it will cause problems when there are other floats involved. It's slightly contrived, but this does apply to the resource manager, for example. Alternative float containment methods (display: table) seem to have some other issues because of the automatic contraction; applying the necessary width has other knock on effects.

    Not sure how we should best handle this now.
     
  4. CyberAP

    CyberAP Well-Known Member

  5. CyberAP

    CyberAP Well-Known Member

  6. Mike

    Mike XenForo Developer Staff Member

    The RM example is contrived, but set the resources per page to 1 and add a border to the page link group - it will expand to the bottom of the left column. It isn't a particularly big deal here, but it would be if something were after the page nav.

    Using display: table with width: 100% would cause problems with margins and using the RM again, it pushes the page nav below the inline mod options.

    However, that "new context" (the last option) at that page looks interesting so I'll have to play with that.
     
    CyberAP likes this.
  7. Mike

    Mike XenForo Developer Staff Member

    I'm experimenting with the "new context" option in 1.2 and it looks to be working pretty well. It seems to be an interesting way of working around the automatic contraction of display:table while still handling padding. We'll see how it goes through the beta. We can always revert to the original method, which isn't that big of a deal.
     

Share This Page