January 18, 20188 yr I have been using the W3C CSS Validator to highlight any problems with the code. What I am getting is ‘Congratulations! No Error Found’ for CSS Level 3, but there are warnings for code like the following: -webkit-linear-gradient(top,#1e5087,#1a4677) -moz-linear-gradient(top,#1e5087,#1a4677) -ms-linear-gradient(top,#1e5087,#1a4677) -o-linear-gradient(top,#1e5087,#1a4677) Do W3C not recognise the above has good practice?
January 19, 20188 yr On 18/01/2018 at 7:05 PM, GrahamUK33 said: I have been using the W3C CSS Validator to highlight any problems with the code. What I am getting is ‘Congratulations! No Error Found’ for CSS Level 3, but there are warnings for code like the following: -webkit-linear-gradient(top,#1e5087,#1a4677) -moz-linear-gradient(top,#1e5087,#1a4677) -ms-linear-gradient(top,#1e5087,#1a4677) -o-linear-gradient(top,#1e5087,#1a4677) Do W3C not recognise the above has good practice? First thing, These CSS validators are a bit of a waste of time. You're better off using a linter like https://github.com/stylelint/stylelint. These can be integrated with your editor and they are also configurable and they can be run in an automated way in your project - like as a pre-commit hook. Secondly those specific vendor prefixes are no longer required https://caniuse.com/#search=grad. I'd recommend you use Autoprefixer to automatically insert any vendor prefixes that are required as part of your build process. Autoprefixer uses the Database that powers CanIUse so you don't even need to be concerned about vendor prefixes again. This, again is configurable allowing you to declare which browsers to support.
January 22, 20188 yr Author Thanks, I have installed an Autoprefixer plugin for Atom, it has stripped out of date vendor prefixes and added in the correct vendor prefixes.
Create an account or sign in to comment