|
Cookbook /
RemovingHTMLStylesSummary: How to remove pmwiki styles from HTML head
Status: Stable
Version: 2006-10-28
Prerequisites: pmwiki 2
Maintainer:
QuestionHow do I move pmwiki style definition from the header of the HTML source into a css file? AnswerTo move all style definitions from the header into a css file is not so easy, since different modules are adding them, and some of those additions cannot be turned off individually. You can find these modules by searching all installed scripts for
The following pmwiki script modules add styles via
Note that some can be turned off in config.php with $HTMLStylesFmt['diff'] = ""; $HTMLStylesFmt['simuledit'] = ""; $HTMLStylesFmt['markup'] = ""; $HTMLStylesFmt['urlapprove'] = ""; $HTMLStylesFmt['vardoc'] = ""; $HTMLStylesFmt['wikistyles'] = ""; $HTMLStylesFmt['pmwiki'] = ""; We could also turn off all
but then we have to make sure that we really don't need After having turned off some $HTMLHeaderFmt['pmwiki-core'] = " <link rel='stylesheet' href='\$FarmPubDirUrl/css/pmwiki-core.css' type='text/css' />\n"; So create or add to pub/css/local.css the following (or put into a new pmwiki-core.css file, see above):
/* wikistyles */
.frame { border:1px solid #cccccc; padding:4px; background-color:#f9f9f9; }
.lfloat { float:left; margin-right:0.5em; }
.rfloat { float:right; margin-left:0.5em; }
/* pmwiki */
ul, ol, pre, dl, p { margin-top:0px; margin-bottom:0px; }
code.escaped { white-space: nowrap; }
.vspace { margin-top:1.33em; }
.indent { margin-left:40px; }
.outdent { margin-left:40px; text-indent:−40px; }
a.createlinktext { text-decoration:none; border-bottom:1px dotted gray; }
a.createlink { text-decoration:none; position:relative; top:−0.5em;
font-weight:bold; font-size:smaller; border-bottom:none; }
img { border:0px; }
/* markup */
table.markup { border:2px dotted #ccf; width:90%; }
td.markup1, td.markup2 { padding-left:10px; padding-right:10px; }
table.vert td.markup1 { border-bottom:1px solid #ccf; }
table.horiz td.markup1 { width:23em; border-right:1px solid #ccf; }
table.markup caption { text-align:left; }
div.faq p, div.faq pre { margin-left:2em; }
div.faq p.question { margin:1em 0 0.75em 0; font-weight:bold; }
/* pagerev */
.diffbox { border:1px #999999 solid; margin-top:1.33em; }
.diffauthor { font-weight:bold; }
.diffchangesum { font-weight:bold; }
.difftime { font-family:verdana,sans-serif; font-size:66%;
background-color:#dddddd; }
.difftype { clear:both; font-family:verdana,sans-serif;
font-size:66%; font-weight:bold; }
.diffadd { border-left:5px #99ff99 solid; padding-left:5px; }
.diffdel { border-left:5px #ffff99 solid; padding-left:5px; }
.diffrestore { clear:both; font-family:verdana,sans-serif;
font-size:66%; margin:1.5em 0px; }
.diffmarkup { font-family:monospace; }
/* urlapprove */
.apprlink { font-size:smaller; }
/* simuledit */
.editconflict { color:green;
font-style:italic; margin-top:1.33em; margin-bottom:1.33em; }
/* vardoc */
a.varlink { text-decoration:none; }
plus any css definitions from any other module or cookbook recipe. Notes
ReleasesCommentsTry as one might, removing See AlsoContributorsUser notes +1: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |