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
Inline-blocks + vertical-align do not render correctly #672
Comments
There are actually two issues here.
Updated sample: <html>
<head>
<style type="text/css">
code {
background:black;
color:white;
display:inline-block;
width: 1em;
margin-bottom: -1.35em;
}
</style>
</head>
<body>
<p>
Some text <code>A<br />
B<br />
C<br />
D</code> continues afterward.
</p>
</body>
</html> |
Thanks for the response. The <style type="text/css">
code {
display: inline-block;
width: 3mm;
height: 3mm;
border: 1px solid black;
font-family: arial;
color: black;
margin-bottom: -10mm;
}
</style>
<p>Some text<code></code>continues afterward.</p> |
I dunno why I went with a negative bottom margin. Guess I was thinking of pulling the object down. You can alternatively use a positive top margin, which is probably more consistent anyway. The real problem is that you have to hand-craft your positioning for every element using this styling since the heights will vary. The best solution would be to fix the issue. |
No updates, but I think auto-width issues will be addressed as part of #627. |
Plus: * Fix style specificity based on the origin of the stylesheet. * Add :focus psudo-class to stylesheet parser. * Fix 'content' css property being set to 'normal' for all :before/:after selectors before determining their specificity. * Add extra check to prevent Helpers::build_url() from throwing a warning for URIs of 1 character (eg: '#'). Closes #1158 Addresses #627, addresses #371 Partially addresses #631 and #26 Fixes #1074, fixes #1031 Partial fix for #672 ... and many more
This code:
Does not render correctly:
I'm having a lot of trouble getting inline-blocks to align nicely in a paragraph of text; DOMPDF doesn't seem to respect the
vertical-align
property. It's particularly bad when you put a normally block-level element in a paragraph, but even when I try with a span, the alignment is off:The text was updated successfully, but these errors were encountered: