+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Styles not showing

Styles not showing

3 posts, 0 answered
  1. Jason
    Jason avatar
    31 posts
    Registered:
    07 Nov 2007
    12 Dec 2007
    Link to this post
    I have the following structure within my EditorConfig file
    <classes>
            <class name="Header" value="h1.title" />
            <class name="SubHeader" value="h2.subtitle" />
            <class name="Event Title" value="h1.reverse" />
            <class name="Speakers" value="h2.reverse" />
        </classes>

    Within the Generic Content Editor only the bottom two show up, the following is the declarations for the first two style classes

    h1, h1.title
    {
        .... some css
    }

    h2, h2.subtitle
    {
       ... some css
  2. Jason
    Jason avatar
    31 posts
    Registered:
    07 Nov 2007
    12 Dec 2007
    Link to this post
    I have tried changing these declarations around a bit, but it never seems to have any effect.  I thought for a while that it was simply being cached.  But after waiting a while nothing changed
  3. Pepi
    Pepi avatar
    981 posts
    Registered:
    28 Oct 2016
    12 Dec 2007
    Link to this post
    Hello Jason,

    If you have css classes defined with the following syntax:

    .Emphasis, p em{color: #A4CE3A; font-style: normal; }

    then the editor will parse and read only the .Emphasis class and will populate the "Apply Class" dropdown only with this class. If the RadEditor starts to parse the strings after the comma, this will drastically decrease the editor performance and it will be loaded slower on the page.

    So the reason for the described behavior is that the editor cannot get h1.title and h2.subtitle because they are declared after the comma. The solution is to declare the classes separately (one by one):

    h1{
        .... some css
    }

    h1.title{
        .... some css
    }


    Hope this helps.

    Regards,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Register for webinar
3 posts, 0 answered