Email or username:

Password:

Forgot your password?
Top-level
Dave Rupert

@bramus Do CSS Highlights support bold/italic? I saw those in your code but had a play and couldn't get it to work. MDN lists a stricter set of allowed properties. Is that changing?

developer.mozilla.org/en-US/do

3 comments
Patrick Brosset

@davatron5000 @bramus I originally wrote this MDN page, and my recollection is that, no, highlight() doesn't support anything that would have an impact on layout. It can only be used to alter the painting of the range.

Bramus

@patrickbrosset @davatron5000 Correct. Only a limited set of styles are allowed. No changing the font-weight or the like.

Dave Rupert

@bramus @patrickbrosset Aw, that's too bad. I guess I understand the reasoning tho.

Go Up