Template:Stroke/doc View history

m (→‎Usage: added style example)
 
(4 intermediate revisions by 2 users not shown)
Line 5: Line 5:
     1px -1px 0 #000,
     1px -1px 0 #000,
     -1px 1px 0 #000,
     -1px 1px 0 #000,
     1px 1px 0 #000;}}
     1px 1px 0 #000,
-1px 0px 0 #000,
1px 0px 0 #000,
0px -1px 0 #000,
0px 1px 0 #000;}}


<span style="color: white; {{stroke}}">This is text with a stroke</span>
<span style="color: white; {{stroke}}">This is text with a stroke</span>
Line 11: Line 15:
== Usage ==
== Usage ==


This template must be used inside a CSS style parameter. To use it on regular text, place the text inside a <span> using the following code:
This template must be used inside a CSS style parameter. To use it on regular text, place the text inside a {{tag|span}} using the following code:
  {{tag|span style{{=}}"{{tl|stroke}}"|open}}YOUR TEXT{{tag|span|close}}
  {{tag|span style{{=}}"{{tl|stroke}}"|open}}YOUR TEXT{{tag|span|close}}


You  can optionally use the {{para|span|YOUR TEXT}} parameter to do this automatically:
You  can optionally use the {{para|span|YOUR TEXT}} parameter to do this automatically:
{{Tlx|Stroke|span{{=}}YOUR TEXT GETS OUTLINED}} will produce
{{Tlx|Stroke|span{{=}}YOUR TEXT GETS OUTLINED}} will produce
{{Stroke|span=YOUR TEXT GETS OUTLINED}}  
{{Stroke|span=YOUR TEXT GETS OUTLINED}}
 
When using {{para|span}}, you can also use {{para|style}} to add additional CSS styles to the text.
{{Tlx|Stroke|span{{=}}Your Styled Text|style{{=}}color: #93C4D3;}} will produce
{{Stroke|span=Your Styled Text|style=color: #93C4D3;}}
 
== Parameters ==
== Parameters ==


This stroke is formed using four shadows. To create unique effects, you can add this template multiple times with different options to the same text.  
This stroke is formed using eight shadows. To create unique effects, you can add this template multiple times with different options to the same text.  
You can specify the overall distance with {{para|distance}}, and color with {{para|color}}.
You can specify the overall distance with {{para|distance}}, and color with {{para|color}}.


Line 32: Line 40:
*{{para|br}} bottom right distance
*{{para|br}} bottom right distance
*{{para|brcolor}} bottom right color
*{{para|brcolor}} bottom right color
*{{para|t}} top distance
*{{para|tcolor}} top color
*{{para|l}} left distance
*{{para|lcolor}} left color
*{{para|r}} right distance
*{{para|rcolor}} right color
*{{para|b}} bottom distance
*{{para|bcolor}} bottom color
*{{Para|span|YOUR TEXT}} encloses you text inside {{tag|span}} tags, with the stroke effect applied.
*{{Para|span|YOUR TEXT}} encloses you text inside {{tag|span}} tags, with the stroke effect applied.
*{{para|style}} will pass through any CSS style codes, and can be used to add additional styling in conjuction with the {{para|span}} parameter.


== Examples ==
== Examples ==

Latest revision as of 00:55, 9 October 2015

This is a documentation subpage for Template:Stroke.
It contains usage information, categories and other content that is not part of the original template page.

This adds a css style parameter to put a stroke around text

text-shadow: 
   -1px -1px 0 #000,  
    1px -1px 0 #000,
    -1px 1px 0 #000,
     1px 1px 0 #000,
-1px 0px 0 #000,
1px 0px 0 #000,
0px -1px 0 #000,
0px 1px 0 #000;

This is text with a stroke

Usage

This template must be used inside a CSS style parameter. To use it on regular text, place the text inside a <span>...</span> using the following code:

<span style="{{stroke}}">YOUR TEXT</span>

You can optionally use the |span=YOUR TEXT parameter to do this automatically: {{Stroke|span=YOUR TEXT GETS OUTLINED}} will produce YOUR TEXT GETS OUTLINED

When using |span=, you can also use |style= to add additional CSS styles to the text. {{Stroke|span=Your Styled Text|style=color: #93C4D3;}} will produce Your Styled Text

Parameters

This stroke is formed using eight shadows. To create unique effects, you can add this template multiple times with different options to the same text. You can specify the overall distance with |distance=, and color with |color=.

You can change individual distances and colors with:

  • |tl= top left distance
  • |tlcolor= top left color
  • |tr= top right distance
  • |trcolor= top right color
  • |bl= bottom left distance
  • |blcolor= bottom left color
  • |br= bottom right distance
  • |brcolor= bottom right color
  • |t= top distance
  • |tcolor= top color
  • |l= left distance
  • |lcolor= left color
  • |r= right distance
  • |rcolor= right color
  • |b= bottom distance
  • |bcolor= bottom color
  • |span=YOUR TEXT encloses you text inside <span>...</span> tags, with the stroke effect applied.
  • |style= will pass through any CSS style codes, and can be used to add additional styling in conjuction with the |span= parameter.

Examples

<span style="{{stroke|distance=0|br=4|color=red}}"><big>This is text with a stroke</big></span>

This is text with a stroke


{{Stroke|span=Text in red outline|color=red}}

Text in red outline