Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • bh 408 posts 1395 karma points
    Aug 27, 2018 @ 16:40
    bh
    0

    "Formats" dropdown on RTF editor illegible

    Here's what my "formats" dropdown looks like on my RTF enter image description here

    Here's the associated CSS file:

    /**umb_name:white*/
    .white { color:rgb(255,255,255); }
    
    /**umb_name:blue*/
    .blue { color:rgb(0,59,92); }
    
    /**umb_name:red*/
    .red { color:rgb(222,78,62); }
    
    /**umb_name:peach*/
    .peach { color:rgb(239,223,211); }
    
    /**umb_name:plum*/
    .plum { color:rgb(114,56,61); }
    
    /**umb_name:sansserif*/
    .sansserif { font-family:"niveau-grotesk",sans-serif; }
    
    /**umb_name:font size 1*/
    .f1 { font-size:8rem!important; line-height:7.5rem!important; }
    
    /**umb_name:font size 2*/
    .f2 { font-size:4rem!important; line-height:3.7rem;  }
    
    /**umb_name:font size 3*/
    .f3 { font-size:3rem!important; line-height:2.5rem; }
    
    /**umb_name:font size 4*/
    .f4 { font-size:2rem!important; line-height:1.8rem; }
    
    /**umb_name:font size 5*/
    .f5 { font-size:1.5rem!important; line-height:1.5rem; }
    
    /**umb_name:font size 6*/
    .small { font-size:.8rem; line-height:1.1rem; }
    
    
    /**umb_name:Serif*/
    /*.serif { font-family:'FFScalaWeb', serif; }*/
    

    Any suggestions?

  • Ben Palmer 176 posts 842 karma points c-trib
    Aug 27, 2018 @ 16:53
    Ben Palmer
    100

    Hi bh,

    You just need to tweak those styles (either through the backoffice or in the stylesheet itself). The styles in the spreadsheet are used as a preview in the RTE so you just need to set the font sizes to something more sensible.

    This on specifically:

    /**umb_name:font size 1*/
    .f1 { font-size:8rem!important; line-height:7.5rem!important; }
    

    The font size is 8rem which is causing the issue. As these styles aren't used in the frontend of websites usually, you should review the sizes set. Usually, for font sizes/headers, I'll set the biggest to 150%, moving down in increments of 10.

    So your font size styles might become:

    /**umb_name:font size 1*/
    .f1 { font-size:150%!important; }
    
    /**umb_name:font size 2*/
    .f2 { font-size:140%rem!important;  }
    
    /**umb_name:font size 3*/
    .f3 { font-size:130%rem!important; }
    

    And so on, you might need to review your line heights separately, too.

    Hope that makes sense,

    Ben

  • bh 408 posts 1395 karma points
    Aug 27, 2018 @ 17:00
    bh
    1

    That's disappointing. The font sizes are what I want them to be on the front end. The CMS shouldn't dictate that. I just removed the font size options from my associated css so the other "formats" are usable. Thanks @BenPalmer

  • Ben Palmer 176 posts 842 karma points c-trib
    Aug 27, 2018 @ 17:24
    Ben Palmer
    0

    Glad it worked!

    The CMS doesn't so much dictate your frontend styles - the rte.css stylesheet is really there just for the backoffice previews, at least that's how I've always approached it. Standard practice would have you style these separately in with your other CSS (or source code, SCSS, for example). More than anything else, using this stylesheet on the frontend would probably be a waste of a request seeing as it's so small.

Please Sign in or register to post replies

Write your reply to:

Draft