wentin / underlineJS

Pushing the boundary of browser typography rendering!
https://underlinejs.wentin.net
2.22k stars 80 forks source link

accept ele color as underline color #35

Open lucker14-zz opened 7 years ago

lucker14-zz commented 7 years ago

Hi there,

I added one more variable for color, in function getElementStyles. It gets calculated css color value and stores it to use in underline generation.

Also I have moved the call for getElementStyles, so it accepts value before assigning color value to underlineStyles object.

This way the underline has the same color as the text that has class "underline"

Reason: We had black color and white text, though we though the library is malfunctioning, it wasn't but this seems as a mistake :)