PmWiki.WikiStyles History

Hide minor edits - Show changes to markup

April 16, 2017, at 05:28 PM EST by Ebony - lz4a8mBjQNsJ
Changed line 1 from:

Extmerely helpful article, please write more. http://zlumlbf.com [url=http://hzotsg.com]hzotsg[/url] [link=http://yfwfdekkica.com]yfwfdekkica[/link]

to:

This is exactly what I was looking for. Thanks for <a href="http://bjywtj.com">wrinitg!</a>

April 15, 2017, at 09:22 PM EST by Allayna - YxSexaRdv
Changed line 1 from:

You've really helped me <a href="http://taqgrofsxq.com">unrsedtand</a> the issues. Thanks.

to:

Extmerely helpful article, please write more. http://zlumlbf.com [url=http://hzotsg.com]hzotsg[/url] [link=http://yfwfdekkica.com]yfwfdekkica[/link]

April 15, 2017, at 03:28 AM EST by Lorren - OQ2Mv2XM9qLQ
Changed line 1 from:

Grade A stuff. I'm unolastiqnebuy in your debt. http://zcdixdc.com [url=http://oevwtj.com]oevwtj[/url] [link=http://kvzbonfjhqk.com]kvzbonfjhqk[/link]

to:

You've really helped me <a href="http://taqgrofsxq.com">unrsedtand</a> the issues. Thanks.

April 14, 2017, at 07:32 PM EST by Gerrie - I79eOnKmqxnI
Changed line 1 from:

Hey, sublte must be your middle name. Great post! http://zzpqvuwjzbs.com [url=http://huabae.com]huabae[/url] [link=http://wvmxxzha.com]wvmxxzha[/link]

to:

Grade A stuff. I'm unolastiqnebuy in your debt. http://zcdixdc.com [url=http://oevwtj.com]oevwtj[/url] [link=http://kvzbonfjhqk.com]kvzbonfjhqk[/link]

April 14, 2017, at 08:42 AM EST by Pink - tQfntMAUJFLg
Changed line 1 from:

Great hammer of Thor, that is <a href="http://xbrquqhtm.com">porulfewly</a> helpful!

to:

Hey, sublte must be your middle name. Great post! http://zzpqvuwjzbs.com [url=http://huabae.com]huabae[/url] [link=http://wvmxxzha.com]wvmxxzha[/link]

April 14, 2017, at 02:49 AM EST by Vicky - E6gdjTfa
Changed line 1 from:

Holy <a href="http://fkymzkel.com">coscine</a> data batman. Lol!

to:

Great hammer of Thor, that is <a href="http://xbrquqhtm.com">porulfewly</a> helpful!

April 13, 2017, at 10:09 AM EST by Jennylee - jsEtW7JpQd
Changed line 1 from:

Knoelwdge wants to be free, just like these articles! http://unxrrfqrd.com [url=http://camxtdov.com]camxtdov[/url] [link=http://dundjdztc.com]dundjdztc[/link]

to:

Holy <a href="http://fkymzkel.com">coscine</a> data batman. Lol!

March 30, 2017, at 03:42 AM EST by Emma - 8EfRg2AQ1b6J
Changed line 1 from:

<a href="http://bflqsgosnr.com">Calnilg</a> all cars, calling all cars, we're ready to make a deal.

to:

Knoelwdge wants to be free, just like these articles! http://unxrrfqrd.com [url=http://camxtdov.com]camxtdov[/url] [link=http://dundjdztc.com]dundjdztc[/link]

March 29, 2017, at 10:30 PM EST by Kaydi - WymfViVcZ
Changed line 1 from:

This is the peefrct post for me to find at this time http://yivxju.com [url=http://euynnignqa.com]euynnignqa[/url] [link=http://eholoirlrrt.com]eholoirlrrt[/link]

to:

<a href="http://bflqsgosnr.com">Calnilg</a> all cars, calling all cars, we're ready to make a deal.

March 29, 2017, at 03:12 PM EST by Shermaine - LEDVwOeGoN
Changed line 1 from:

Now that's <a href="http://hbfqtiatwij.com">subetl!</a> Great to hear from you.

to:

This is the peefrct post for me to find at this time http://yivxju.com [url=http://euynnignqa.com]euynnignqa[/url] [link=http://eholoirlrrt.com]eholoirlrrt[/link]

March 21, 2017, at 03:20 PM EST by Elly - wKPQadyq9
Changed line 1 from:

What a plreause to meet someone who thinks so clearly

to:

Now that's <a href="http://hbfqtiatwij.com">subetl!</a> Great to hear from you.

March 19, 2017, at 11:19 PM EST by Idalia - GLYTDAjiowS
Changed line 1 from:

, have mercy woman! It takes a sense of charity, a basic thigaooecll virtue, and a dampening of pride, the worst of the seven deadly sins, to hold your tongue and quell bitter thoughts. None of us is that hot. Oh, and always talk politely to each other, and greet him when you see him after work, even though you see him all the time. Most the older single men I know are really, really bitter. Lots of baggage there and I don't think it's all their fault.

to:

What a plreause to meet someone who thinks so clearly

March 19, 2017, at 09:56 PM EST by Cornelia - PWGckuX8Ye
Changed line 1 from:

Thank you thank you thank you thank you!!! I needed this esalcipley for a special print.css in my homemade styling and I'm a novice so this really, really helped! The thing, which indents my paragraphs 0.5 inch to look like APA academic format, was bumping my images over, too. This helped so much; thanks again! jg -

to:

, have mercy woman! It takes a sense of charity, a basic thigaooecll virtue, and a dampening of pride, the worst of the seven deadly sins, to hold your tongue and quell bitter thoughts. None of us is that hot. Oh, and always talk politely to each other, and greet him when you see him after work, even though you see him all the time. Most the older single men I know are really, really bitter. Lots of baggage there and I don't think it's all their fault.

September 13, 2015, at 07:47 AM EST by Rekha - 5QIA2Bhtp53
Changed lines 1-182 from:

authors (basic)

Wikistyle basics

WikiStyles allow authors to modify the color and other styling attributes of a page's contents. A wikistyle is written using percent-signs, as in %red% or %bgcolor=blue%.

The most basic use of wikistyles is to change text attributes such as color, background color, and font. PmWiki defines several wikistyles for changing the text color to %black%, %white%, %red%, %yellow%, %blue%, %gray%, %silver%, %maroon%, %green%, %navy%, and %purple%.

(:markup:) The basket contains %red% apples, %blue% blueberries, %purple% eggplant, %green% limes, %% and more.

For colors other than the predefined colors, use the %color=...% wikistyle. (Note: RGB colors (#rrggbb) should always be specified with lowercase letters to avoid WikiWord conflicts.)

(:markup:) I'd like to have some %color=#ff7f00% tangerines%%, too!

To change the background color, use %bgcolor=...% as a wikistyle:

(:markup:) This sentence contains %bgcolor=green yellow% yellow text on a green background.

See PmWiki:WikiStyleColors for more color help.

Scopes

Wikistyles can also specify a scope; with no scope, the style is applied to any text that follows up to the next wikistyle specification or the end of the paragraph, whichever comes first. Including a scope changes the specification to apply to the whole paragraph (%p ...%), an entire list (%list ...%), an item within a list (%item ...%), or any block (%block ...%). Those scopes are predefined shortcuts for the "apply=" attribute, which is discussed below.

(:markup:) %p bgcolor=#ffeeee% The wikistyle specification at the beginning of this line applies to the entire paragraph, even if there are %blue% other wikistyle specifications %% in the middle of the paragraph.

The >>style<< block can be used to apply a wikistyle to a large block of items. The style is applied until the next >><< is encountered.

(:markup:) >>blue font-style=italic bgcolor=#ffffcc<< Everything after the above line is styled with blue italic text, This includes preformatted text * lists -> indented items >><<

Wikistyle attributes

The style attributes recognized within a wikistyle specification are:

    ------------ CSS -------------          --HTML--
    color               bgcolor             class 
    background-color    margin              id
    text-align          padding             hspace
    text-decoration     border              vspace
    font-size           float               target
    font-family         list-style          rel
    font-weight         width*              accesskey
    font-style          height*             value
    display

    Special: define, apply

The attributes in the first two columns correspond to the cascading style sheet (CSS) properties of the same name. The attributes in the last column apply only to specific items:

  • class= and id= assign a CSS class or identifier to an HTML element
  • target=name opens links that follow in a browser window called "name"
  • rel=name in a link identifies the relationship of a target page
  • accesskey=x uses 'x' as a shortcut key for the link that follows
  • value=9 sets the number of the current ordered list item

* The width and height attributes have asterisks because they are handled specially for <img .../> tags. If used by themselves (i.e., without anything providing an "apply=" parameter to the wikistyle), then they set the 'width=' and 'height=' attributes of any <img ... /> tags that follow. Otherwise, they set the 'width:' and 'height:' properties of the element being styled.

Applying wikistyles to blocks

Normally a wikistyle applies to a span of (inline) text, but the apply= attribute allows a style to be applied to something else. The predefined apply= values are:

apply=imgapply the style to any image that follows 
apply=papply the style to the current paragraph*
apply=preapply the style to the current preformatted text 
apply=listapply the style to the current list*
apply=itemapply the style to the current list item*
apply=divapply the style to the current div 
apply=blockapply the style to the current block,
whether it's a paragraph, list, list item,
heading, or division.
*

The starred items also have wikistyle shortcuts already defined, thus %p color=blue% is the same as %apply=p color=blue%, and %list ROMAN% is the same as %apply=list list-style=upper-roman%.

Some wikistyle shortcuts also make use of apply, thus %right% is a shortcut for %text-align=right apply=block%.

An applied wikistyle will only take effect if it's on the line that starts the thing it's supposed to modify. In other words, a wikistyle in the third markup line of a paragraph can't change the attributes of the paragraph:

(:markup:) here is some text in a paragraph and if we try to %apply=p color=blue% change the color of the paragraph in the middle it won't work because the style comes after the paragraph has already been started.

(:markup:) However, this %p color=red% paragraph ''will'' be in red because its block style does occur in the first line of its text.

(:markup:) * Here's a list item * %list red% Oops, too late to affect the list!

Enabling Styles

Styles not listed above can be enabled by a PMWiki Adminstrator by modifying the local/config.php file. For instance to enable the "line-height" style attribute add the line

    $WikiStyleCSS[] = 'line-height';

to the local/config.php file.

Custom style shortcuts

The define= attribute can be used to assign a shorthand name to any wikistyle specification. This shorthand name can then be reused in later wikistyle specifications.

(:markup:) %define=box block bgcolor=#ddddff border="2px dotted blue"% %box% [@ $ echo "Hello world" Hello World $ exit @] %box font-weight=bold color=green% [@ $ echo "I said, HELLO" @]

Tip: It's often a good idea to put common style definitions into Group Header pages so that they can be shared among multiple pages in a group. Or, the wiki administrator can predefine styles site-wide as a local customization (see CustomWikiStyles).

Tip: Use custom style definitions to associate meanings with text instead of just colors. For example, if warnings are to be displayed as green text, set %define=warn green% and then use %warn% instead of %green% in the document. Then, if you later decide that warnings should be styled differently, it's much easier to change the (one) definition than many occurrences of %green% in the text.

Tip: Any undefined WikiStyle is automatically treated as a request for a class, thus %pre% is the same as saying %class=pre%.

Predefined style shortcuts

PmWiki defines a number of style shortcuts.

  • Text colors: black, white, red, yellow, blue, gray, silver, maroon, green, navy, purple (shortcut for %color=...%)
  • Justification: %center% and %right%
  • Images and boxes
    • Floating left or right: %rfloat% and %lfloat%
    • Framed items: %frame%, %rframe%, and %lframe%
    • Thumbnail sizing: %thumb%
  • Open link in new window: %newwin% (shortcut for %target=_blank%)
  • Comments: %comment% (shortcut for %display=none%)
  • Ordered lists: %decimal%, %roman%, %ROMAN%, %alpha%, %ALPHA% (see also Cookbook:OutlineLists)

Examples

WikiStyleExamples contains a number of examples of ways to use wikistyles in pages.

Known Issues

  • Percents in style definitions (like: %block width=50% %) require the use of "pct" instead of "%".

See Also

Custom Wiki Styles

<< | Documentation Index | >>

Some of my colors aren't working! For example, %color=#AAAAAA% works, but %color=#AA3333% doesn't work. What's wrong?

Be sure to use lowercase letters for rgb hex colors, otherwise PmWiki may mistake the color value for a WikiWord.

to:

Thank you thank you thank you thank you!!! I needed this esalcipley for a special print.css in my homemade styling and I'm a novice so this really, really helped! The thing, which indents my paragraphs 0.5 inch to look like APA academic format, was bumping my images over, too. This helped so much; thanks again! jg -

Copyright © 2007, Jonathan L.S. Byrnes
Web site by Lexington Digital
Page last modified on April 16, 2017, at 05:28 PM EST