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

First line not working as expected on Firefox #16

Open
thomasboulongne opened this issue Jul 17, 2018 · 2 comments
Open

First line not working as expected on Firefox #16

thomasboulongne opened this issue Jul 17, 2018 · 2 comments

Comments

@thomasboulongne
Copy link

On Firefox, lining wraps the first line in a separate element, plus creates an empty text-line before.
Any idea why is this happening?
See example here: https://codepen.io/anon/pen/pZbzyP

@zmmbreeze
Copy link
Owner

zmmbreeze commented Jul 24, 2018

There is no need to call lining(document.getElementById('div'));. Adding an attribute named data-lining is enough. Lining.js will handle the rest of thing. 😄

<p data-lining>...</p>

Please checkout this two example:

  1. https://codepen.io/anon/pen/mjmBOw
  2. https://codepen.io/anon/pen/mjmBxq

@thomasboulongne
Copy link
Author

The thing is I'm using lining on dynamic content processed by markdown, so I don't have the control of the DOM elements. Which is why the use of lining on the parent element is the way to go for me, and works perfectly anywhere but in Firefox

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

2 participants