-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
Better styles for scissors in HTML output #267
Conversation
I'm a bit sceptical about all this. I see two different problems. First is pure HTML rendered in the browser. When zoomed, scissors will be positionned differently. Second is when it's imported into a PDF. To see what happens here, I used Dompdf, but the unicode char is not rendered correctly (just see a ? ) :-( Can you change the left positionning of scissors so it fits your needs, and give me these numbers, so I can see what it looks like on my side? |
For me, the position should be
I was wondering whether maybe we should use an image instead of a font to display the scissors? But personally I do not really care about |
I see in my browser that with your value, positionning is good when I zoom. We can move on with what fits your usage (integration in a PDF via a translator HTML>PDF). I added some styles for width, height, line-height, font-weight, etc. Positionning should be more stable across devices and usages. What does it looks like on your side now? |
@tafel |
Chromium and Firefox on Ubuntu@24 Maybe it's a good thing, because it better matches what I see now :-P I pushed an update. Could you try and tell me if it looks good? |
If you change |
Good enough, I would say. |
ooooh ;-) We use your lib inside a docker container, where our app resides. In production, Debian or alpine. Maybe we are all alone in that case, who knows :-P (but we do not use Html renderer) I tried an other approach, without :after. It's less clean (since horizontal scissors are still inside a pseudo-element) but it will, I hope, behave evenly in all browsers... |
🙌 That looks fine to me and now even works with Docraptor. Thanks a lot! |
This PR changes the way scissors are positionned in HTML output.
A new HTML tag is added explicitly for this, and positionning is done regarding this element.
This should close #266