User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

harlowe:background [2017/10/09 20:39]
harlowe:background [2017/10/09 20:39] (current)
Line 1: Line 1:
 +**(background:​ // [[harlowe:​Colour|colour]] or [[harlowe:​String|String]]//​) -> //​[[harlowe:​Changer|Changer]]//​**
 +This styling [[harlowe:​Command|Command]] alters the background [[harlowe:​colour|colour]] or background image
 +of the attached hook. Supplying a colour, or a [[harlowe:​string|string]] contanining a CSS
 +hexadecimal colour (such as ''​%%#​A6A612%%''​) will set the background to a flat colour.
 +Other strings will be interpreted as an image URL, and the background will be
 +set to it.
 +=== Example usage: ===
 +  * ''​%%(background:​ red + white)[Pink background]%%''​
 +  * ''​%%(background:​ "#​663399"​)[Purple background]%%''​
 +  * ''​%%(background:​ "​marble.png"​)[Marble texture background]%%''​
 +=== Details: ===
 +Combining two (background:​) commands will do nothing if they both influence the
 +colour or the image. For instance ''​%%(background:​red) + (background:​white)%%''​ will simply
 +produce the equivalent ''​%%(background:​white)%%''​. However, ''​%%(background:​red) + (background:"​mottled.png"​)%%''​
 +will work as intended if the background image contains transparency,​ allowing the background
 +colour to appear through it.
 +Currently, supplying other CSS colour names (such as ''​%%burlywood%%''​) is not
 +permitted - they will be interpreted as image URLs regardless.
 +No error will be reported if the image at the given URL cannot be accessed.
 +=== See also: ===
harlowe/background.txt ยท Last modified: 2017/10/09 20:39 (external edit)