full-width-text icon indicating copy to clipboard operation
full-width-text copied to clipboard

Changed computedStyle return string, now it works in Firefox

Open mdesplenter opened this issue 8 years ago • 2 comments

This fixes issue #2

mdesplenter avatar Mar 07 '17 08:03 mdesplenter

Thanks @mdesplenter. Two things:

  1. Given that getStyle function receives "font" as a parameter we should probably add this hack outside this function. Maybe in a getFontStyle function.
  2. The font shorthand that was previously being used includes more than just font-size and font-family. It includes font-style, font-variant, font-weight, font-size, line-height and font-family. The fix should include all those styles following the font shorthand format.

pomber avatar Mar 07 '17 16:03 pomber

Here is a jsbin I was using some time ago to test getComputedStyle in various browsers: https://jsbin.com/yoholarina/1/edit?html,console Maybe it can help you.

pomber avatar Mar 07 '17 16:03 pomber