CSS3 calc() validation: Value Error : width Parse Error [duplicate]
Asked Answered
C

1

10

I need to validate a CSS3 file where I'm using the following code:

width:calc(96.3% - 312px)

It returns this error:

Value Error : width Parse Error - 312px)

My last choice is to use a Javascript function on page load and window resize to get the width value when it's possible using CSS3 (only for IE8 or older).

Casanova answered 11/7, 2014 at 11:21 Comment(0)
V
14

This appears to be a bug in the validator. Your calc() syntax is valid. Don't worry about it.

Whenever you need to validate your CSS, remove just that declaration so it does not cause irrecoverable parse errors.

Victorie answered 11/7, 2014 at 11:51 Comment(3)
Oh I see, thank you. Now I found the bug: w3.org/Bugs/Public/show_bug.cgi?id=18913. Is there a method to hide/remove a declaration without editing the code? Thanks.Casanova
@Gerard: I don't think so.Victorie
unfortunately this bug is still there almost two years later - I just found this question&answer here after having the same problem validating and googling for it...Riggins

© 2022 - 2024 — McMap. All rights reserved.