Open swengle opened 2 years ago
@swengle Thanks for your submission! Indeed there is an "underline line-through"
value available in React Native textDecorationLine
style property so a solution is technically possible. That will have to be handled in the @native-html/css-processor
library. I am busy right now with the 6.2 release, but I will address this at some point.
After reading more about the CSS3 specification (https://www.w3.org/TR/css-text-decor-3/#line-decoration), I realize that this specific CSS property does not follow the traditional inheritance scheme, where a close rule would override a distant rule, but instead relies on some sort of merging mechanism that propagates to the CSS box tree, while sometimes aborting, such as when hitting an out-of-flow box (think float: left
or position: absolute
). In the end, the propagation model is fairly complex:
Note that text decorations are not propagated to any out-of-flow descendants, nor to the contents of atomic inline-level descendants such as inline blocks and inline tables. They are also not propagated to inline children of inline boxes, although the decoration is applied to such boxes.
Note: Line decorations are propagated through the box tree, not through inheritance, and thus have no effect on descendants when specified on an element with display: contents.
This exception to the rule makes an implementation costly, because it would require a re-architecture of the CSS processor. For that very reason, I don't plan on providing this feature anytime soon! But I will let the issue open in the meantime.
Decision Table
<yyy>
is not rendered”Good Faith Declaration
Description
The renderer supports strike and underline, except when they are both together.
<html><head></head><body><p><s><u>The fox jumped</u></s></p></body></html>
Renders just the underline.
React Native Information
RNRH Version
6.1.0
Tested Platforms
Reproduction Platforms
Minimal, Reproducible Example
export default simple_test_case;
Additional Notes
No response