kylekatarnls/jade-filter-stylus

This package is abandoned and no longer maintained. No replacement package was suggested.

Render stylus code as compiled CSS in a style tag

Maintainers

👁 kylekatarn

Package info

github.com/kylekatarnls/jade-filter-stylus

pkg:composer/kylekatarnls/jade-filter-stylus

Statistics

Installs: 29

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

2.0.0 2016-07-25 11:49 UTC

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

MIT 74f8b41990c36cb2b9d184f7e41a3657e4044430

  • Kyle Katarn <kylekatarnls.woop@gmail.com>

This package is auto-updated.

Last update: 2020-03-06 08:57:22 UTC


README

This repository now lives on https://github.com/pug-php/pug-filter-stylus

pug-filter-stylus

This template:

//- set from php controller
- $prev = $color

//- set in the pug template
- $color = 'red'

head
 :stylus
 prev = yellow
 p
 color #{color}
 a
 color #{prev}
 em
 color prev
body
 p
 | I'm
 =color
 | but my links are
 a=prev
 | and my quotes are
 em=prev

with data like this:

$pug = new Pug();
$pug->render('template.pug', array(
 'color' => 'red',
));

will be rendered like this:

<head>
 <style type="text/css">
 p {
 color: red;
 }
 p a {
 color: yellow;
 }
 p em {
 color: yellow;
 }
</style>
</head>
<body>
 <p>
 I'm red but my links are <a>yellow</a> and my quotes are <em>yellow</em>
 </p>
</body>