3

After finishing my new HTML5/CSS3 template I proceeded to W3C validation.

The result for HTML: "This document was successfully checked as HTML5!"

The result for CSS: "Sorry! We found the following errors (1)"

And the problem is around height: calc(100vh - 80px);

It also told me:

36      Property -ms-transform is an unknown vendor extension
37      Property -webkit-transform is an unknown vendor extension
112     Property -webkit-transition is an unknown vendor extension
113     Property -moz-transition is an unknown vendor extension
249     Property -webkit-background-size is an unknown vendor extension
292     Property -webkit-background-size is an unknown vendor extension

So in this case what shall I do to get it 100% CSS3 valid?

unor
  • 92,415
  • 26
  • 211
  • 360
medk
  • 9,233
  • 18
  • 57
  • 79

3 Answers3

4

Don't worry about the vendor extensions. I don't recall why they are flagged that way but they are not errors on your part. I don't recall the reasoning for it. iirc, there is a checkbox to ignore these warnings.

The explanation may lie in this article where it states:

Vendor-specific extensions (mostly) do adhere to the CSS 2.1 grammar, but since they are not defined in the CSS 2.1 specification, they are invalid. Hence the CSS validator is correct in reporting them as validation errors.

Rob
  • 14,746
  • 28
  • 47
  • 65
  • Indeed there is. http://stackoverflow.com/questions/1889724/how-to-validate-vendor-prefixes-in-css-like-webkit-and-moz – BoltClock Jun 03 '15 at 09:23
1

Check out caniuse.com before worrying too much about vendor prefixes:

http://caniuse.com/#feat=calc

In this case, it may be because you don't need them. Based on the w3 specs, too.

http://www.w3.org/TR/css3-values/#calc

Fei Lauren
  • 149
  • 1
  • 1
  • 10
1

Regarding calc():

The fact that the W3C CSS validator reports errors when using calc() is a bug:

Support calc() from CSS3 Values (currently still unfixed)

Regarding vendor extensions:

Their use is only listed as warning, not as error.

So your CSS can be valid despite using vendor extensions.

Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360