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

Fixed tag weighting rules - generating tag with level 8

Discussion in 'Resolved Bug Reports' started by vbuser, Aug 28, 2015.

  1. vbuser

    vbuser Active Member

    My tags are all appearing about the same size and color. One tag has been used over 500 times and only difference is slightly darker color #176093. What are the current rules? Can we change them?
     
  2. Mike

    Mike XenForo Developer Staff Member

    See the tag.css template and the tagCloudTag<1-7> selectors.
     
  3. Brogan

    Brogan XenForo Moderator Staff Member

  4. vbuser

    vbuser Active Member

    I'm checking my site with firebug and the tag in question is marked .tagCloudTag8. There is no css for that class. I changed tags.css from

    Code:
    .tagCloud
    {
       overflow: hidden;
    }
    
    .tagCloud li
    {
       display: inline-block;
       margin-right: 8px;
    }
    
    .tagCloud li:last-child
    {
       margin-right: 0;
    }
    
    .tagCloud .tagCloudTag1 { font-size: 100%; color: @primaryLightish; }
    .tagCloud .tagCloudTag2 { font-size: 100%; }
    .tagCloud .tagCloudTag3 { font-size: 125%; }
    .tagCloud .tagCloudTag4 { font-size: 150%; }
    .tagCloud .tagCloudTag5 { font-size: 175%; }
    .tagCloud .tagCloudTag6 { font-size: 200%; }
    .tagCloud .tagCloudTag7 { font-size: 225%; color: @primaryDark; }
    to

    Code:
    .tagCloud
    {
       overflow: hidden;
    }
    
    .tagCloud li
    {
       display: inline-block;
       margin-right: 8px;
    }
    
    .tagCloud li:last-child
    {
       margin-right: 0;
    }
    
    .tagCloud .tagCloudTag1 { font-size: 100%; color: @primaryLightish; }
    .tagCloud .tagCloudTag2 { font-size: 100%; }
    .tagCloud .tagCloudTag3 { font-size: 125%; }
    .tagCloud .tagCloudTag4 { font-size: 150%; }
    .tagCloud .tagCloudTag5 { font-size: 175%; }
    .tagCloud .tagCloudTag6 { font-size: 200%; }
    .tagCloud .tagCloudTag7 { font-size: 225%; }
    .tagCloud .tagCloudTag8 { font-size: 250%; color: @primaryDark; }

    Let me know if I did something wrong.
     
  5. Mike

    Mike XenForo Developer Staff Member

    It shouldn't actually go up to 8, so there might be a bug in the code. I'll need to look into this (it happens here).
     
  6. Mike

    Mike XenForo Developer Staff Member

    This appears to be a floating point rounding error. The logic was sound (as far as I can tell), but there was a specific situation where a value printing out as 7 was ceil()'ing to 8. I have prevented this now (for the next release).
     
    vbuser likes this.

Share This Page