Ralph
Ralph

Reputation: 3029

CSS tag not colored in Sublime Text

I am trying to edit a css code using sublime text2 as a text editor. The problem I am encountering however is that the .css file is not reading the li tag. Here is a copy of the css code, the tagged that are not becoming colored on sublime text are li, a, and a:hover(I wrote HERE next to the part of the code where I am facing trouble)

I don't know if it is related, but I am using scss then using codekit to get css code.

html, body {    /* covers the html and body tags */
width: 100%;  /* width and height to make sure it fills the browser */
height: 100%;  
padding: 0; /* padding and margin set to 0 not to mess with our elements*/
margin: 0;
}

.navigation {    /* class of navgiation */
padding: 0; 
margin: 0;
background: #333; 
position: fixed; /* As we scroll down the page, it will always still in the top or where it is*/
top: 0;  /* 0 pixels away from the top*/
z-index: 999; /* As we go through the slides, it will always be on top of any layer */
width: 100%; /*Scroll all the way across our page*/

HERE---->li{
    display: inline-block;
    padding: 5px 10px;

    a {
        color: #e1e1e1;
        text-decoration: none;

        a:hover {
            color: lighten(#e1e1e1, 20%);
        }
    }
}

.active {
    background-color: lighten(#333, 20%);
}
}

Upvotes: 0

Views: 1197

Answers (2)

Andy G
Andy G

Reputation: 19367

Pure css rules cannot be nested, so Sublime Text is probably not parsing them as css.

You mention scss but you need to set this language option in ST, and it will require a plug-in installed, for it to recognise the syntax.

Upvotes: 2

symlink
symlink

Reputation: 12209

Sublime Text sometimes does this. Try moving

.active {
    background-color: lighten(#333, 20%);
}

to the top and you'll see that it in turn turns white.

If it's compiling correctly don't worry about it.

Upvotes: 0

Related Questions