Skip to content

Commit

Permalink
Item12192: using <link /> elems now instead of <style>@import()</styl…
Browse files Browse the repository at this point in the history
…e> for better performance

git-svn-id: http://svn.foswiki.org/trunk@17428 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
MichaelDaum authored and MichaelDaum committed Mar 20, 2014
1 parent 9305838 commit 290d125
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions PatternSkin/templates/css.pattern.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,13 @@
%TMPL:DEF{"styles:default"}%%TMPL:P{"styles:screen"}%
%TMPL:P{"styles:print"}%%TMPL:END%

%TMPL:DEF{"styles:screen"}%<style type="text/css" media="all">
%IF{ "$ FOSWIKI_LAYOUT_URL" then="@import url('%FOSWIKI_LAYOUT_URL%');"}%
%IF{ "$ FOSWIKI_STYLE_URL" then="@import url('%FOSWIKI_STYLE_URL%');"}%
%IF{ "$ FOSWIKI_COLORS_URL" then="@import url('%FOSWIKI_COLORS_URL%');"}%
</style>%TMPL:P{"styles:custom_skin"}%%IF{ "$ USERLAYOUTURL or $ USERSTYLEURL or $ USERCOLORSURL" then="$percntTMPL:P{$quotstyles:user_defined$quot}$percnt"}%%TMPL:P{"styles:dynamic"}%%TMPL:END%
%TMPL:DEF{"styles:screen"}%%IF{ "$ FOSWIKI_LAYOUT_URL" then="<link rel='stylesheet' href='%FOSWIKI_LAYOUT_URL%' media='all' />"}%
%IF{ "$ FOSWIKI_STYLE_URL" then="<link rel='stylesheet' href='%FOSWIKI_STYLE_URL%' media='all' />"}%
%IF{ "$ FOSWIKI_COLORS_URL" then="<link rel='stylesheet' href='%FOSWIKI_COLORS_URL%' media='all' />"}%
%TMPL:P{"styles:custom_skin"}%%IF{ "$ USERLAYOUTURL or $ USERSTYLEURL or $ USERCOLORSURL" then="$percntTMPL:P{$quotstyles:user_defined$quot}$percnt"}%%TMPL:P{"styles:dynamic"}%%TMPL:END%


%TMPL:DEF{"styles:print"}%<style type="text/css" media="%IF{'$\'URLPARAM{cover}\'=\'print\'' then='all' else='print'}%">
@import url("%PUBURLPATH%/%SYSTEMWEB%/PatternSkin/print.css");
</style>%TMPL:END%

%TMPL:DEF{"styles:print"}%<link rel='stylesheet' href='%PUBURLPATH%/%SYSTEMWEB%/PatternSkin/print.css' media='%IF{"$'URLPARAM{cover}'='print'" then="all" else="print"}%' />%TMPL:END%

%TMPL:DEF{"styles:dynamic"}%<style type="text/css" media="all">
/* Styles that are set using variables */
Expand All @@ -25,13 +21,13 @@
</style>%TMPL:END%


%TMPL:DEF{"styles:user_defined"}%%{ "kept for compatibility with TWiki 4.2" }%<style type="text/css" media="all">%IF{ "$ USERLAYOUTURL" then="@import url('%USERLAYOUTURL%');"}%%IF{ "$ USERSTYLEURL" then="@import url('%USERSTYLEURL%');"}%%IF{ "$ USERCOLORSURL" then="@import url('%USERCOLORSURL%');"}%</style>%TMPL:END%
%TMPL:DEF{"styles:user_defined"}%%{ "kept for compatibility with TWiki 4.2" }%%IF{ "$ USERLAYOUTURL" then="<link rel='stylesheet' href='%USERLAYOUTURL%' media='all' />"}%
%IF{ "$ USERSTYLEURL" then="<link rel='stylesheet' href='%USERSTYLEURL%' media='all' />"}%
%IF{ "$ USERCOLORSURL" then="<link rel='stylesheet' href='%USERCOLORSURL%' media='all' />"}%%TMPL:END%


%TMPL:DEF{"styles:custom_skin"}%<style type="text/css" media="all">
%IF{ "$ PATTERNSKIN_COLUMNS" then="@import url('%PATTERNSKIN_COLUMNS%');"}%
%IF{ "$ PATTERNSKIN_THEME_VARIANT" then="@import url('%PATTERNSKIN_THEME_VARIANT%');"}%
</style>%TMPL:END%
%TMPL:DEF{"styles:custom_skin"}%%IF{ "$ PATTERNSKIN_COLUMNS" then="<link rel='stylesheet' href='%PATTERNSKIN_COLUMNS%' media='all' />"}%
%IF{ "$ PATTERNSKIN_THEME_VARIANT" then="<link rel='stylesheet' href='%PATTERNSKIN_THEME_VARIANT%' media='all' />"}%%TMPL:END%


%TMPL:DEF{"styles:iespecific"}%<!--[if IE 7 ]><style type="text/css" media="screen">
Expand Down

0 comments on commit 290d125

Please sign in to comment.