Add less-plugin-autoprefix and use it to simplify our CSS.
Review Request #7989 — Created Feb. 22, 2016 and submitted
We had a few places where we had defined LESS functions to add vendor prefixes
to CSS. This wasn't entirely consistent (for example, we had a mix of the
standardopacity
and our own.opacity()
), and most of it was out of date.This change pulls in
less-plugin-autoprefix
, which uses the very nice
autoprefixer project to automatically rewrite any rules which require prefixes
based on which browsers we want to support. For now, I've made that list of
supported browsers be anything which has more than 2% market share, plus IE 9
and 10 (which are each about 0.8% right now). I wouldn't mind dropping support
for those older IEs, but that's a separate decision.The one thing which autoprefixer doesn't do is add
filter()
for linear
gradients in IE9. I've left those in for now, but if we drop IE9 for 2.6+, then
those can go away too.
Reloaded and checked that static media was rebuilt. Looked in the compiled .css
files and saw that things which required browser prefixes (such astransform
being rewritten as bothtransform
and-ms-transform
) were handled as
expected.
- Change Summary:
-
Add back in alias rules for any extensions which might depend on them.
- Diff:
-
Revision 2 (+239 -406)
-
Tool: Pyflakes Processed Files: reviewboard/settings.py Ignored Files: package.json reviewboard/static/rb/css/pages/reviews.less reviewboard/static/rb/css/pages/admin-dashboard.less reviewboard/static/rb/css/ui/dnd-uploader.less reviewboard/static/rb/css/pages/newReviewRequest.less reviewboard/static/rb/css/mixins/upload-diff.less reviewboard/static/rb/css/ui/datagrids.less reviewboard/static/rb/css/pages/text-review-ui.less reviewboard/static/rb/css/pages/diffviewer.less reviewboard/static/rb/css/ui/sidebars.less reviewboard/static/rb/css/mixins/gradients.less reviewboard/static/rb/css/pages/image-review-ui.less reviewboard/static/rb/css/pages/base.less reviewboard/static/rb/css/ui/boxes.less reviewboard/static/rb/css/common.less reviewboard/static/rb/css/pages/admin.less reviewboard/static/rb/css/ui/buttons.less reviewboard/static/rb/css/mixins/style.less Tool: PEP8 Style Checker Processed Files: reviewboard/settings.py Ignored Files: package.json reviewboard/static/rb/css/pages/reviews.less reviewboard/static/rb/css/pages/admin-dashboard.less reviewboard/static/rb/css/ui/dnd-uploader.less reviewboard/static/rb/css/pages/newReviewRequest.less reviewboard/static/rb/css/mixins/upload-diff.less reviewboard/static/rb/css/ui/datagrids.less reviewboard/static/rb/css/pages/text-review-ui.less reviewboard/static/rb/css/pages/diffviewer.less reviewboard/static/rb/css/ui/sidebars.less reviewboard/static/rb/css/mixins/gradients.less reviewboard/static/rb/css/pages/image-review-ui.less reviewboard/static/rb/css/pages/base.less reviewboard/static/rb/css/ui/boxes.less reviewboard/static/rb/css/common.less reviewboard/static/rb/css/pages/admin.less reviewboard/static/rb/css/ui/buttons.less reviewboard/static/rb/css/mixins/style.less
-
-