1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-14 10:52:41 +01:00
phorge-phorge/src/view/page
epriestley 87ccca32b6 Add printable support to CSS
Summary:
Fixes T2146. This is a really simple approach, you just do:

  !print .rule {
    whatever: blah;
  }

And it transforms it into:

  .printable .rule {
    whatever: blah;
  }

  @media print {
    .rule {
      whatever: blah;
    }
  }

So we end up with these rules twice, but they should compress well and we shouldn't need that many of them, and this fix is way way simpler than all the nonsense I discussed in T2146.

Test Plan:
  - Added a unit test.
  - Added a simple rule to throw away the menubar when printing.
  - Checked the latter with `/?__print__=1`.

Reviewers: chad, btrahan

Reviewed By: chad

CC: chad, aran

Maniphest Tasks: T2146

Differential Revision: https://secure.phabricator.com/D7363
2013-10-19 14:23:19 -07:00
..
menu Show "Search" in menubar while logged out if users can access it 2013-09-27 10:49:59 -07:00
AphrontPageView.php Restore merge of phutil_tag. 2013-02-13 14:51:18 -08:00
AphrontRequestFailureView.php Restore merge of phutil_tag. 2013-02-13 14:51:18 -08:00
PhabricatorBarePageView.php Properly escape inline <script> 2013-04-20 17:55:47 -07:00
PhabricatorStandardPageView.php Add printable support to CSS 2013-10-19 14:23:19 -07:00