Add less-plugin-autoprefix and use it to simplify our CSS.

Review Request #7989 — Created Feb. 22, 2016 and submitted

Information

Review Board
release-2.6.x

Reviewers

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
standard opacity 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 as transform
being rewritten as both transform and -ms-transform) were handled as
expected.

Description From Last Updated

'django_reset' imported but unused

reviewbotreviewbot

'from settings_local import *' used; unable to detect undefined names

reviewbotreviewbot

'django_reset' imported but unused

reviewbotreviewbot

'from settings_local import *' used; unable to detect undefined names

reviewbotreviewbot
reviewbot
  1. 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
    
    
  2. reviewboard/settings.py (Diff revision 1)
     
     
    Show all issues
     'django_reset' imported but unused
    
  3. reviewboard/settings.py (Diff revision 1)
     
     
    Show all issues
     'from settings_local import *' used; unable to detect undefined names
    
  4. 
      
brennie
  1. Ship It!
  2. 
      
david
reviewbot
  1. 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
    
    
  2. reviewboard/settings.py (Diff revision 2)
     
     
    Show all issues
     'django_reset' imported but unused
    
  3. reviewboard/settings.py (Diff revision 2)
     
     
    Show all issues
     'from settings_local import *' used; unable to detect undefined names
    
  4. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.6.x (53bc220)