Bootstrap 4.0.0 未通过 W3C 验证?

Bootstrap 4.0.0 fail W3C validation?

我正在制作的应用程序遇到问题,该应用程序试图缩小我的整个 .css 文件。

似乎 bootstrap 在两个 normal and .min 版本上都没有通过 W3C 验证。

关于这个问题有什么线索吗?

Bootstrap 的文档 explains the issue。他们正在使用一些 "hacks" 作为某些浏览器错误的解决方法,以及新的 CSS 功能,这些功能可能尚未在验证器中得到支持。

除此之外,其余CSS有效

In order to provide the best possible experience to old and buggy browsers, Bootstrap uses CSS browser hacks in several places to target special CSS to certain browser versions in order to work around bugs in the browsers themselves. These hacks understandably cause CSS validators to complain that they are invalid. In a couple places, we also use bleeding-edge CSS features that aren’t yet fully standardized, but these are used purely for progressive enhancement.

These validation warnings don’t matter in practice since the non-hacky portion of our CSS does fully validate and the hacky portions don’t interfere with the proper functioning of the non-hacky portion, hence why we deliberately ignore these particular warnings.