Pulsar-Edit-Highlights / line

@Pulsar-Edit package for highlighting the currently selected line.
https://web.pulsar-edit.dev/packages/highlight-line
MIT License
52 stars 16 forks source link

Handle opacity percentages better #11

Closed philnash closed 10 years ago

philnash commented 10 years ago

I was trying to set the opacity of the highlight to 5%, but parseFloat("5%") is 5 and "0.#{5}" becomes 0.5 or 50%.

Dividing by 100 and returning seems to work much better in this situation. Note that the check for whether the opacity was 100 meant that if 100 was set the value returned was 100, leaving the rgba value as rgba(r, g, b, 100) this fix makes that rgba(r, g, b, 1).

richrace commented 10 years ago

Cheers. Will publish when later.

philnash commented 10 years ago

Thanks @richrace!