We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Like CSS, Transphporm supports @import 'filename'; You can store common display logic in one place and include it in another TSS file.
@import 'filename';
For example, you can write a TSS file that re-populates form data from post using:
form textarea {content: data(attr(name))} form input[type="text"]:attr(value) {content: data(attr(name))}
If you store this in form.tss you can import it in another TSS file using the code:
form.tss
@import 'form.tss';
imported.tss
h1 {content: "From imported tss"}
$xml = ' <h1> </h1> <div> </div> '; $tss = " @import 'imported.tss'; div {content: 'From main tss'} "; $template = new \Transphporm\Builder($xml, $tss); echo $template->output()->body;
Output:
<h1>From imported tss</h1> <div>From main tss</div>
For information on how this works, see the section on populating forms.
Basics
Additional features
Examples
Customization
TSS API