问题
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).
回答1:
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.
来源:https://stackoverflow.com/questions/24696512/css3-calc-validation-value-error-width-parse-error