You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c31c042
Browse filesBrowse the repository at this point in the historyBrowse files
Let a block inside an inline element inherit its style, and draw the text after the block in it again
Under the standard cssMode, a block opened inside open inline elements, as in
<span class="note">…<div>…</div>…</span> or a card written as
<a href="…"><div>…</div></a>, inherits their text state, and a link around
it covers its text. The inline elements' saved states are set aside on the
enclosing block while the block is open and put back when it closes, so the
text after the block is drawn in their style and their end tags restore what
was there before them. Kept blocks laid out again and blocks reopened after a
forced page break find them set aside already. Legacy is unchanged.
InheritedProperties::blockTextState() gives the state a block inherits, and
every reader of it goes through it: the inherited properties, an em or %
font size, the weight bolder and lighter step from, and currentColor.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG-GRAVITYPDF.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -241,6 +241,7 @@ Bugfixes
241
241
* Characters mPDF moved into a substitute font (`useSubstitutions`, and the fonts for supplementary planes) were wrapped in a `<span>` that stylesheet rules reached, so `span { border: 1px solid }` drew a box around them, and the span counted among its siblings for `:nth-child()`. In the standard CSS mode no rule reaches that span and it is not counted, as a browser has no such element. The legacy mode styles it as before. [#634]
242
242
* Some inherited properties stopped short of where a browser takes them. A `text-shadow` did not reach a block's child blocks or list items. `word-spacing`, `hyphens` and `text-outline` did not reach the content of a positioned block. `text-transform`, `text-shadow`, `font-variant` and the other font features did not reach a table's cells. A table nested in a cell took none of the cell's colour, font, size, weight, style, transform or shadow. Each of these channels now carries every inherited property mPDF supports, from the one list in `Mpdf\Css\InheritedProperties`. Under the standard `cssMode` only; set `'cssMode' => \Mpdf\CssMode::LEGACY` to keep the old output. [#539][#648]
243
243
*`text-transform: none` on an inline element, such as a `<span>` in an uppercase paragraph, did not undo the transform it inherits. Under the standard `cssMode` only; set `'cssMode' => \Mpdf\CssMode::LEGACY` to keep the transform. [#552][#539][#648]
244
+
* A block inside an inline element, such as `<span class="note">…<div>…</div>…</span>` or a card written as `<a href="…"><div>…</div></a>`, lost the inline element's colour, font and other inherited text properties, and so did the inline element's text after the block. A link lost its colour and underline on the block's text and did not cover it. In a table cell the block kept the style, but the text after the inline element did too. A block now inherits the text properties of the inline elements it opens in, and the text after it is drawn in their style until they end. Text before the inline element, on the line before the block, is no longer drawn in the inline element's colour or covered by its link. Under the standard `cssMode` only; set `'cssMode' => \Mpdf\CssMode::LEGACY` to keep the old output. [#541][#653]
244
245
245
246
### Images and SVG
246
247
@@ -912,3 +913,5 @@ These changes do not change output.
0 commit comments