The Span element is a generic inline container for phrasing content, which does not inherently represent anything. It can be used to group elements for styling purposes, or because they share attribute values. Span element is very much like a Div element, but Div is a block-level element whereas a Span is an inline element.
Usage
Simple example of usage Span
element with fluent interface.
use function Thermage\span;
use function Thermage\render;
// ...
render (
span('Stay RAD!')
->px20()
->mx20()
->colorGreen()
->bgPurple()
->bold()
);
Simple example of usage Span
element with magic classes pipeline.
use function Thermage\span;
use function Thermage\render;
// ...
render (
span('Stay RAD!', 'px-20 mx-20 color-green bg-purple bold')
);
Terminal
$ php thermage.php
Stay RAD!
Methods
Method | Description |
---|---|
bg | Set Span element background color style. |
blink | Set Span element blink style. |
bold | Set Span element bold style. |
color | Set Span element text color style. |
d | Set Span element display style. |
dim | Set Span element dim style. |
display | Set Span element display style. |
getShortcodes | Get Span element shortcodes instance. |
getTheme | Get Span element theme. |
getValue | Get Span element value. |
invisible | Set Span element invisible style. |
italic | Set Span element italic style. |
ml | Set Span margin left style. |
mr | Set Span margin right style. |
mx | Set Span margin both style. |
pl | Set Span padding left style. |
pr | Set Span padding right style. |
px | Set Span padding both style. |
render | Render Span element. |
reverse | Set Span element reverse property. |
setShortcodes | Set Span element shortcodes instance. |
setTheme | Set Span element theme instance. |
strikethrough | Set Span element strikethrough style. |
underline | Set Span element underline style. |
value | Set Span element value. |
Getting Started
Methods
- bg Set Span element background color style.
- blink Set Span element blink style.
- bold Set Span element bold style.
- color Set Span element text color style.
- d Set Span element display style.
- dim Set Span element dim style.
- display Set Span element display style.
- getShortcodes Get Span element shortcodes instance.
- getTheme Get Span element theme.
- getValue Get Span element value.
- invisible Set Span element invisible style.
- italic Set Span element italic style.
- ml Set Span margin left style.
- mr Set Span margin right style.
- mx Set Span margin both style.
- pl Set Span padding left style.
- pr Set Span padding right style.
- px Set Span padding both style.
- render Render Span element.
- reverse Set Span element reverse property.
- setShortcodes Set Span element shortcodes instance.
- setTheme Set Span element theme instance.
- strikethrough Set Span element strikethrough style.
- underline Set Span element underline style.
- value Set Span element value.