CircleType
CircleType copied to clipboard
Modified Library - Background color, styling options etc.
Would there be any interest in a slightly modified version of this where you can provide padding/margin options to the span elements to enable you to set a background color and a border radius on the ends of your background color?
Unfortunately my math isn't good enough to figure out how to dynamically size the padding so it only works for fixed size circles as you need to manually set the padding for the circle size right now. I tried dynamic padding but couldn't get the formula right.
For the background color basically we add padding-right and overflow:hidden and then a negative left margin of half the padding value and it shifts all back to where it belongs but with your background color. padding, margins and border radius are all provided through .options() method.
I also added a default css class to the elements so you can style them and an optional argument to set your own classname, and an update method so you can change the text string on the fly with a bit of animation.
I am new to github/coding in general so I am not sure how best to submit but if anyone is interested in the "proof of concept" and wants to improve I'd be more than happy to share... just tell me how.