A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/w3c/csswg-drafts/issues/4988 below:

[css-inline-3] initial-letters changing used, not computed font-size · Issue #4988 · w3c/csswg-drafts · GitHub

An element used for initial-letters will have its used font-size adjusted based on the algorithm specified in css-inline-3. However its computed font size remains unchanged.

This is a problem for any child of the "initial-letters" element that refers to the parent font size as part of a style property - for example, if a child sets font-size: 0.5em, it will be 50% of the font-size the parent would have been, had it not been an initial-letter.

<p style="font-size: 20px; line-height: 1">
 <span style="initial-letters:3">
  A
  <span style="font-size: 0.5em; baseline-shift: 0.5em">
   B
  </span>
 </span>
</p>

The letter "A" has a computed font-size of 60px. The letter "B" has a font-size and baseline-shift of 10px, instead of the 30px an author would expect. Anyone creating superscript text as part of an initial letter would encounter this issue.

This issue is migrated from item 6 in #4171. There was considerable discussion of this in the January 2020 F2F, which is listed in the minutes however no resolution was reached.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3