1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-11 01:12:41 +01:00
phorge-phorge/src/infrastructure
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
..
__tests__ In unit test environments, install all applications 2013-05-16 12:25:26 -07:00
celerity Add printable support to CSS 2013-10-19 14:23:19 -07:00
customfield PHUIPropertyListView 2013-10-11 07:53:56 -07:00
daemon Remove PhabricatorRepository::loadAllByPHIDOrCallsign() 2013-09-26 12:36:24 -07:00
diff Don't fatal with error in transaction diff 2013-04-16 08:41:36 -07:00
edges Allow projects to review revisions 2013-10-05 14:10:46 -07:00
env Fix controller-level access rules 2013-10-03 19:05:47 -07:00
events Add event dispatch for updated search indexes 2013-09-12 13:05:54 -07:00
internationalization Add some missing non-context translations 2013-10-17 10:48:44 -07:00
javelin Add Link button to Remarkup assist 2013-10-17 18:57:40 -07:00
lint Remove deprecated javelin_render_tag() and phabricator_render_form() 2013-07-18 13:30:25 -07:00
markup Implement Graphviz, Figlet and Cowsay as Remarkup interpreter blocks 2013-10-16 19:12:14 -07:00
query Distinguish between invalid/broken handles and filtered handles 2013-10-17 10:49:21 -07:00
ssh Implement SSHD glue and Conduit SSH endpoint 2012-12-19 11:08:07 -08:00
storage Migrate all Differential inline comments to ApplicationTransactions 2013-10-19 05:03:25 -07:00
testing Fix controller-level access rules 2013-10-03 19:05:47 -07:00
time Consolidate some datetime code and add unit tests 2013-06-03 12:58:11 -07:00
util Proof of concept mitigation of BREACH 2013-08-07 16:09:05 -07:00
PhabricatorAccessLog.php Fail quietly when failing to write access log 2013-05-09 16:08:26 -07:00
PhabricatorEditor.php Use ManiphestTaskQuery in nearly all interfaces 2013-09-25 13:44:14 -07:00