wentin / underlineJS

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

text-underline-width #27

Open lgedeon opened 9 years ago

lgedeon commented 9 years ago

In your proposal for CSS4, it was unclear whether you were referring to width on the x or y axis. Since this is a long horizontal line, it is most likely talking about the y-axis.

That said, It would be helpful to have a way to specify left and right margin/padding so that the underline can be extended beyond the text, or start halfway under the first letter.

In the future, it might be worth considering adding a lot of other things that can be done to a rectangle like shadows and such.

philwareham commented 9 years ago

Also, aren't some of these proposals already in the CSS Text Decoration Module Level 3 proposal? In particular text-decoration-color, text-decoration-skip, text-underline-position.

wentin commented 9 years ago

thanks for those feedback! I will think about adding padding margin as an option in underline.js. And yes, some of the css such as color and skip is already included. though text-underline-position is different than my suggestion. it is left, right, under, mine is where it sits between the baseline and descender line, in px or percentage. also there are underline-stroke-width (I need to rethink about those setting naming, suggestions are welcome!)