-
Notifications
You must be signed in to change notification settings - Fork 45
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
Color of text-decoration shouldn't be changed by children #417
Comments
Given the way our text drawing is implemented, this is very complicated to solve:
So, for me, looks like too much kludged needed for this little minor issue (and well, on eInk I wouldn't have noticed :) |
Fair enough
True for the red/blue case above, but the real motivation is because it'll go badly wrong if the child sets |
On that note, what happens if you set |
We don't yet support |
@Frenzie: the text-decoration should be hidden in that case. https://www.w3.org/TR/css-text-decor-3/#line-decoration
<p>Before <span style="color:red; text-decoration:underline;">Underlined Red <span style="visibility:hidden;">Hidden</span> text</span> After</p> |
Btw, what's your use cases for this and #418 ? |
I found some books using <span style="text-decoration:line-through;">
<span style="color:transparent;">———</span>
</span> ( |
@johnbeard Very much not my question. ;-) Assume I know what should happen or where to find it, but that I don't want to or can't create a testcase to load in crengine right now. :-P |
@Frenzie is this the answer to your question? |
Haha, in a sense, yes.
…On Thursday, February 4, 2021, John Beard ***@***.***> wrote:
@Frenzie <https://github.com/Frenzie> is this the answer to your question?
transparent-color.epub.zip
<https://github.com/koreader/crengine/files/5925650/transparent-color.epub.zip>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#417 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABRQBJFTS7XTGOMRL2BOWLS5KHHLANCNFSM4XCTJDLA>
.
|
Was giving this some thoughts, and thought that for such case, we might just have another flag But that would solve only the color issue when there is a single text decoration - because we could have underline from a red parent, and strikethough from a blue grandparent :/ Also, from https://www.w3.org/TR/CSS2/text.html#lining-striking-props:
crengine indeed has implemented text-decoration by propagating the decoration to the descendant elements. It's somehow OK in real-life. But re-working it all for CSS2.1++ conformance seems like a heavy task for little real-life benefit, so I'd rather not take the risk. The hack above would just solve the color issue, and not much else - so I guess I can drop the idea. #418 is doable #418 (comment) by just picking and passing the bg color as the fg color. |
From the CSS Level 1 spec: (https://www.w3.org/TR/CSS1/#text-decoration)
For example:
Should look like this:
However, in crengine, the text decoration takes the child element's color:
EPUB with the above:
text-decoration-color-test.epub.zip
The text was updated successfully, but these errors were encountered: