Use autoprefixer for vendor specific properties
We should use autoprefixer for generating vendor specific properties, pseudo elements.
There are many advantages to using autoprefixer like having less code to maintain and avoid duplication of css rules.
And it looks like we already have autoprefixer in our setup (according to yarn.lock file).
Any advice from people who have used autoprefixer?
I'm in favor of this. It simplifies our css quite a bit.
already have autoprefixer in our setup
yarn pulls in a lot of things, you can check the file and see who pulls it in...
@clarkbw what do you think?
stylelint and cssnano require it.
yarn why autoprefixer
yarn why autoprefixer
yarn why v0.19.1
[1/4] Why do we have the module "autoprefixer"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
[4/4] Calculating file sizes...
info Reasons this module exists
- "stylelint" depends on it
- "devtools-launchpad#css-loader#cssnano" depends on it
info Disk size without dependencies: "376kB"
info Disk size with unique dependencies: "9.16MB"
info Disk size with transitive dependencies: "10.17MB"
info Amount of shared dependencies: 13
Done in 1.44s.
@clarkbw what do you think?
👍 There is a plugin for PostCSS https://github.com/postcss/autoprefixer and it might be nice to have a version that strips everything but the moz extensions for the panel builds.
We can swap configs on the moz builds pretty easily by just overriding it in the script that compiles the build. That tackle's the moz prefixes only for the internal stuff.
@clarkbw my guess is that we'll add all the prefixes, which is okay too...
my guess is that we'll add all the prefixes, which is okay too...
Only for the Firefox build. I know we get bugs filed about this often. The -webkit CSS prefix creates error logs in the browser console so if we could remove the unneeded prefixes we wouldn't see those bugs filed anymore.
Otherwise I think we'd always want the prefixes for a target set of browsers we want to work with.
got it. This might be nice in an devtools-core bug where we strip out the bad prefixes when we publish.
https://github.com/devtools-html/devtools-core/issues/128
ping @irfanhudda, @amitzur, @nchevobbe any interest in picking this up?
I'll pick this up.