Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The behavior of Jade may prevent this module to work out of the box #47

Closed
pmaoui opened this issue Mar 5, 2016 · 4 comments
Closed

Comments

@pmaoui
Copy link

pmaoui commented Mar 5, 2016

Hi, thank you for this module.

I had to investigate to understand why this module doesn't worked "out of the box". Just by adding data-fittext as a directive on my element.

It appears that Jade compiles data-fittext as data-fittext="data-fittext" in HTML in order to support older browser (they don't like empty attribute). I would suggest to use a specific attribute name for the compressor value instead of using the default directive attribute value.

It's not a big deal but Jade is quite popular and it will probably save some time to other people in the exact same situation :)

Regards,

@pmaoui pmaoui changed the title The behavior of Jade can make complicated integration The behavior of Jade may prevent this module to work out of the box Mar 5, 2016
@dogancelik
Copy link

dogancelik commented Apr 29, 2016

👍 for Jade support, since the project I'm working is using Jade too

@case12
Copy link

case12 commented Jun 10, 2016

I was able to get around this by doing inline tags in my jade file.

| <h1 data-fittext>This worked for me</h1>

or you can still do it in regular jade by using the compressor attribute.
h1(data-fittext='1') This worked for me

@patrickmarabeas
Copy link
Owner

Eep, forgot about this issue sorry. Should be an easy fix by ensuring that the value is a number || 1.

@patrickmarabeas
Copy link
Owner

Fix has been published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants