• Resolved Biscione

    (@biscione)


    I am having some issues tacking on minor custom CSS rules through the Jetpack CSS editor.

    Looking at the debugger, it seems the custom css simply isn’t being called whatsoever, despite verifying the html tags and css classes match up correctly.

    I also tried the same thing with the Simple Custom CSS plugin, and this was able to call the custom stylesheet, but in an incorrect manner. It applied any CSS rules to the child object instead of the targeted object. To clarify;

    CSS

    .contents p {
    	font-size: 14px;
    	font-weight:700;
    	text-transform: uppercase;
    	text-align: right;
    	line-height: 1;
    	letter-spacing: 1.5px;
    	font-family: "Source Sans Pro", sans-serif;
    }
    .subcat span {
    	font-size: 10px;
    	text-indent: 20px;
    	text-transform: uppercase;
    	text-align: right;
    	line-height: 1;
    	letter-spacing: 1.5px;
    	font-family: "Source Sans Pro", sans-serif;
    }

    HTML

    <p class="contents">This is line 1.</p>
    <p class="contents">This is line 2.
    <span class="subcat">This is subcategory 1.
    This is subcategory 2.
    This is subcategory 3.</span>
    This is line 3.</p>

    In this example, the rules for the paragraph class “contents” were applied to the span class “subcat”, and no custom css of any kind was applied to the “contents” class. I verified this in the debugger.

    How do I get the edit css plugin and the theme to interact correctly with each other? I would imagine there is a theme-specific reason behind this unusual behaviour.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author acosmin

    (@acosmin)

    You need to respect the css classes hierarchy.

    For example posts that appear on the main page have a class .post-template-1. In single view a post has the class .single-template-1. So you need to put the parent’s class in front ex:

    .post-template-1 .title {
       font-size: 20px;
    }

    I need a better example from you. What exactly do you want to style?

    Thread Starter Biscione

    (@biscione)

    I understand what you mean, and that did the trick just fine. Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Jetpack Edit CSS’ is closed to new replies.