1

When I try validating the following code:

   .cd-stretchy-nav ul a { (line 186)
    position: relative;
    display: block;
    height: 50px;
    line-height: 50px;
    padding: 0 calc(1em + 60px) 0 1em;
    color: white;
    opacity: 1;
    font-size: 1rem;
    -webkit-transition: color 0.2s;
    -moz-transition: color 0.2s;
    transition: color 0.2s;
}

    .cd-stretchy-nav ul a::after { (line 200)
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    right: 22px;
    top: 50%;
    -webkit-transform: translateY(-50%) scale(0);
    -moz-transform: translateY(-50%) scale(0);
    -ms-transform: translateY(-50%) scale(0);
    -o-transform: translateY(-50%) scale(0);
    transform: translateY(-50%) scale(0);
}

I get these errors.

191 .cd-stretchy-nav ul a Parse Error calc(1em + 60px) 0 1em;

200 Parse Error [: white; opacity: 1; font-size: 1rem; -webkit-transition: color 0.2s; -moz-transition: color 0.2s; transition: color 0.2s; } .cd-stretchy-nav ul a::after]

What exactly is causing these errors? code works fine in website.

1 Answer 1

1

The problem is that there is a bug in the CSS3 validation service provided by W3C. See https://www.w3.org/Bugs/Public/show_bug.cgi?id=18913 for more information.

As far as I can tell, there is nothing wrong with your CSS calc value and the second error is likely a result of the false-negative response from that service.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.