Talesoft / tale-jade

A complete and fully-functional implementation of the Jade template language for PHP
http://jade.talesoft.codes
MIT License
88 stars 10 forks source link

"-class" doesn't compile as a class but a text #113

Closed YamiOdymel closed 8 years ago

YamiOdymel commented 8 years ago

Some CSS framework named their classes like: -large, -big, -disabled,

And when I tried it, it compiled as a text instead of a class.

Tale-Jade:

img.-large.-circular

Compiled:

<img>
  -large.-circular
</img>

Expected:

<img class="-large -circular">
TorbenKoehn commented 8 years ago

Yep, that's not supported right now.

Try to use class="-large" for now (Think about stacking, you can do class='-large' class='-circular' if you like)

I'll implement this for the next release.

TorbenKoehn commented 8 years ago

Hey, this should be fixed in the recent commit.

Pull *@dev and tell me if it works

YamiOdymel commented 8 years ago

It works, thanks :D

Tale Jade

.ts.-abc.-def.-gh-ij.--kl.mn.-op
    .q.r: .s.t
        .u.v: .wx-.yz.-ab.--cd.e
            .f.g: button.h.i.-jkl.--mn
                | Hello, World

Outputed

<div class="ts -abc -def -gh-ij --kl mn -op">
    <div class="q r">
        <div class="s t">
            <div class="u v">
                <div class="wx- yz -ab --cd e">
                    <div class="f g">
                        <button class="h i -jkl --mn">
                            Hello, World
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>