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
The lists that carry inherited properties to child blocks, positioned blocks and table cells each drop some #539
mPDF passes inherited properties on through separate hand-written lists, and each list drops some. Measured on gravitypdf at d660a410, PHP 8.5.4. Each property was set on the ancestor and read from the state the descendant's text is drawn with:
Ancestor → descendant
Carried by
Dropped
block → child block
InlinePropertyConverter::convert() of the parent's saved InlineProperties, in CssMerger::mergeBlockCascadingCss()
text-shadow
positioned block → its content
the properties WriteFixedPosHTML() hands to the block's content (#474)
word-spacing
table → cells
base_table_properties, built in Table::open() (src/Tag/Table.php:286-330)
text-transform, text-shadow, font-variant
outer cell → nested table's cells
base_table_properties and cell['PARENTCELL'] (src/Tag/Table.php:38-59)
For example, .a{text-shadow:1px 1px #f00} on <div class="a"><p>text</p></div> draws the p without a shadow. table{text-transform:uppercase} leaves the cell text as written.
Fix. Keep one list of the inherited properties mPDF supports, and derive every channel from it, so a property is carried everywhere or nowhere.
Tests. Each row above.
Also from #552: text-transform: none on an inline element.p{text-transform:uppercase} span{text-transform:none} on <p>x <span>qq</span></p> draws QQ. In setCSS(), case 'NONE': breaks before the lines that clear the transform bits (src/Mpdf.php:19975-19980). Blocks reset only because a block starts from fresh state.
Tests (also).text-transform: none on an inline element under an uppercase block.
Related: #547 replaces these channels under the opt-in cascade.
Activity