From 41c8048efd0d4b8053ee6f72fd277b9f602ded17 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 24 Mar 2010 14:50:12 +0100 Subject: [PATCH] Moved print inside base stylesheet using media rules. One less HTTP GET. --- lib/action.php | 3 +-- theme/base/css/display.css | 32 ++++++++++++++++++++++++++++ theme/biz/css/base.css | 32 ++++++++++++++++++++++++++++ theme/biz/css/display.css | 3 ++- theme/cloudy/css/display.css | 30 ++++++++++++++++++++++++++ theme/default/css/display.css | 4 +++- theme/h4ck3r/css/base.css | 32 ++++++++++++++++++++++++++++ theme/h4ck3r/css/display.css | 5 ++++- theme/identica/css/display.css | 4 +++- theme/pigeonthoughts/css/base.css | 32 ++++++++++++++++++++++++++++ theme/pigeonthoughts/css/display.css | 4 +++- 11 files changed, 174 insertions(+), 7 deletions(-) diff --git a/lib/action.php b/lib/action.php index 491d7d4810..09113a598e 100644 --- a/lib/action.php +++ b/lib/action.php @@ -198,8 +198,7 @@ class Action extends HTMLOutputter // lawsuit if (Event::handle('StartShowStatusNetStyles', array($this)) && Event::handle('StartShowLaconicaStyles', array($this))) { - $this->cssLink('css/display.css',null,'screen, projection, tv'); - $this->cssLink('css/print.css','base','print'); + $this->cssLink('css/display.css',null, 'screen, projection, tv, print'); Event::handle('EndShowStatusNetStyles', array($this)); Event::handle('EndShowLaconicaStyles', array($this)); } diff --git a/theme/base/css/display.css b/theme/base/css/display.css index d58684efbe..36f0533b14 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -7,6 +7,7 @@ * @link http://status.net/ */ +@media screen, projection, tv { * { margin:0; padding:0; } img { display:block; border:0; } a abbr { cursor: pointer; border-bottom:0; } @@ -1688,3 +1689,34 @@ width:auto; #bookmarklet #wrap { min-width:0; } + +}/*end of @media screen, projection, tv*/ + + +@media print { +a:after { background-color:#FFFFFF; } +a:not([href^="#"]):after { content:" <"attr(href)"> "; } +img { border:none; } +p { orphans: 2; widows: 1; } + +#site_nav_global_primary, +#site_nav_local_views, +#form_notice, +.pagination, +#site_nav_global_secondary, +.entity_actions, +.notice-options, +#aside_primary, +.form_subscription_edit .submit { +display:none; +} +.timestamp dt, .timestamp dd, +.device dt, .device dd { +display:inline; +} +.profiles li, +.notices li { +margin-bottom:18px; +} + +}/*end of @media print*/ diff --git a/theme/biz/css/base.css b/theme/biz/css/base.css index 2c2ab33a01..43b8e4656c 100644 --- a/theme/biz/css/base.css +++ b/theme/biz/css/base.css @@ -7,6 +7,7 @@ * @link http://status.net/ */ +@media screen, projection, tv { * { margin:0; padding:0; } img { display:block; border:0; } a abbr { cursor: pointer; border-bottom:0; } @@ -1358,3 +1359,34 @@ display:none; .guide { clear:both; } + +}/*end of @media screen, projection, tv*/ + + +@media print { +a:after { background-color:#FFFFFF; } +a:not([href^="#"]):after { content:" <"attr(href)"> "; } +img { border:none; } +p { orphans: 2; widows: 1; } + +#site_nav_global_primary, +#site_nav_local_views, +#form_notice, +.pagination, +#site_nav_global_secondary, +.entity_actions, +.notice-options, +#aside_primary, +.form_subscription_edit .submit { +display:none; +} +.timestamp dt, .timestamp dd, +.device dt, .device dd { +display:inline; +} +.profiles li, +.notices li { +margin-bottom:18px; +} + +}/*end of @media print*/ diff --git a/theme/biz/css/display.css b/theme/biz/css/display.css index 3e97444f15..cafb152dcc 100644 --- a/theme/biz/css/display.css +++ b/theme/biz/css/display.css @@ -7,8 +7,9 @@ * @link http://status.net/ */ -@import url(base.css); +@import url(base.css) screen, projection, tv, print; +@media screen, projection, tv { html { background-color:#144A6E; } diff --git a/theme/cloudy/css/display.css b/theme/cloudy/css/display.css index 5bc32e6d95..d9e9f3ce20 100644 --- a/theme/cloudy/css/display.css +++ b/theme/cloudy/css/display.css @@ -7,6 +7,7 @@ * @link http://status.net/ */ +@media screen, projection, tv { * { margin:0; padding:0; } img { display:block; border:0; } a abbr { cursor: pointer; border-bottom:0; } @@ -2099,4 +2100,33 @@ border-left-color:#FFFFFF; #footer { background-color:#FFFFFF; } +}/*end of @media screen, projection, tv*/ + +@media print { +a:after { background-color:#FFFFFF; } +a:not([href^="#"]):after { content:" <"attr(href)"> "; } +img { border:none; } +p { orphans: 2; widows: 1; } + +#site_nav_global_primary, +#site_nav_local_views, +#form_notice, +.pagination, +#site_nav_global_secondary, +.entity_actions, +.notice-options, +#aside_primary, +.form_subscription_edit .submit { +display:none; +} +.timestamp dt, .timestamp dd, +.device dt, .device dd { +display:inline; +} +.profiles li, +.notices li { +margin-bottom:18px; +} + +}/*end of @media print*/ diff --git a/theme/default/css/display.css b/theme/default/css/display.css index d7f15cc469..7ccd234cd0 100644 --- a/theme/default/css/display.css +++ b/theme/default/css/display.css @@ -7,8 +7,9 @@ * @link http://status.net/ */ -@import url(../../base/css/display.css); +@import url(../../base/css/display.css) screen, projection, tv, print; +@media screen, projection, tv { body, a:active { background-color:#CEE1E9; @@ -516,3 +517,4 @@ background-position:90% 47%; background-position:10% 47%; } +}/*end of @media screen, projection, tv*/ diff --git a/theme/h4ck3r/css/base.css b/theme/h4ck3r/css/base.css index 18ea742a59..0302653fde 100644 --- a/theme/h4ck3r/css/base.css +++ b/theme/h4ck3r/css/base.css @@ -7,6 +7,7 @@ * @link http://status.net/ */ +@media screen, projection, tv { * { margin:0; padding:0; } img { display:block; border:0; } a abbr { cursor: pointer; border-bottom:0; } @@ -1137,3 +1138,34 @@ display:none; .guide { clear:both; } + +}/*end of @media screen, projection, tv*/ + + +@media print { +a:after { background-color:#FFFFFF; } +a:not([href^="#"]):after { content:" <"attr(href)"> "; } +img { border:none; } +p { orphans: 2; widows: 1; } + +#site_nav_global_primary, +#site_nav_local_views, +#form_notice, +.pagination, +#site_nav_global_secondary, +.entity_actions, +.notice-options, +#aside_primary, +.form_subscription_edit .submit { +display:none; +} +.timestamp dt, .timestamp dd, +.device dt, .device dd { +display:inline; +} +.profiles li, +.notices li { +margin-bottom:18px; +} + +}/*end of @media print*/ diff --git a/theme/h4ck3r/css/display.css b/theme/h4ck3r/css/display.css index 58b3f242ae..7112765abd 100644 --- a/theme/h4ck3r/css/display.css +++ b/theme/h4ck3r/css/display.css @@ -7,8 +7,9 @@ * @link http://status.net/ */ -@import url(base.css); +@import url(base.css) screen, projection, tv, print; +@media screen, projection, tv { html, body, a:active { @@ -234,3 +235,5 @@ background-position:10% 45%; background-image:url(../../base/images/icons/twotone/green/arrow-right.gif); background-position:90% 45%; } + +}/*end of @media screen, projection, tv*/ diff --git a/theme/identica/css/display.css b/theme/identica/css/display.css index d9f39e7803..3972657a79 100644 --- a/theme/identica/css/display.css +++ b/theme/identica/css/display.css @@ -7,8 +7,9 @@ * @link http://status.net/ */ -@import url(../../base/css/display.css); +@import url(../../base/css/display.css) screen, projection, tv, print; +@media screen, projection, tv { body, a:active { background-color:#F0F2F5; @@ -515,3 +516,4 @@ background-position:90% 47%; background-position:10% 47%; } +}/*end of @media screen, projection, tv*/ diff --git a/theme/pigeonthoughts/css/base.css b/theme/pigeonthoughts/css/base.css index 2814260bd3..bd12e6eaac 100644 --- a/theme/pigeonthoughts/css/base.css +++ b/theme/pigeonthoughts/css/base.css @@ -7,6 +7,7 @@ * @link http://status.net/ */ +@media screen, projection, tv { * { margin:0; padding:0; } img { display:block; border:0; } a abbr { cursor: pointer; border-bottom:0; } @@ -1383,3 +1384,34 @@ display:none; .guide { clear:both; } + +}/*end of @media screen, projection, tv*/ + + +@media print { +a:after { background-color:#FFFFFF; } +a:not([href^="#"]):after { content:" <"attr(href)"> "; } +img { border:none; } +p { orphans: 2; widows: 1; } + +#site_nav_global_primary, +#site_nav_local_views, +#form_notice, +.pagination, +#site_nav_global_secondary, +.entity_actions, +.notice-options, +#aside_primary, +.form_subscription_edit .submit { +display:none; +} +.timestamp dt, .timestamp dd, +.device dt, .device dd { +display:inline; +} +.profiles li, +.notices li { +margin-bottom:18px; +} + +}/*end of @media print*/ diff --git a/theme/pigeonthoughts/css/display.css b/theme/pigeonthoughts/css/display.css index dfeb01b48a..de5164ea82 100644 --- a/theme/pigeonthoughts/css/display.css +++ b/theme/pigeonthoughts/css/display.css @@ -7,8 +7,9 @@ * @link http://status.net/ */ -@import url(base.css); +@import url(base.css) screen, projection, tv, print; +@media screen, projection, tv { html { background:url(../images/illustrations/illu_pigeons-01.png) no-repeat 0 100%; } @@ -496,3 +497,4 @@ background-position:90% 47%; background-position:10% 47%; } +}/*end of @media screen, projection, tv*/ -- 2.39.5