This project is read-only.
1
Vote

Using Unicode characters instead of GIFs?

description

There are Unicode characters for stars, https://en.wikipedia.org/wiki/Star_(glyph), and for "delete" too. This would make the package even lighter.

comments

dandv wrote Jan 24, 2014 at 4:19 AM

gidon wrote Jan 26, 2014 at 9:56 AM

Out of my head I would say that one could add a "svg" image as background. This would allow you to add textual elements as background.

Any background, both the GIF and the SVG file could be embedded inside the CSS file (data URI), thus removing the extra image file.I will soon add an example showing this in the examples gallery.

I guess your real request is to pass in a character on-the-fly. Changing the current layout system would mean a big overhaul. For a later release I might be able to create something that takes that character and builds either a canvas, or svg picture on the fly.

gidon wrote Jan 26, 2014 at 1:49 PM

Associated with changeset 35795: Added example of using SVG images as background

dandv wrote Feb 25, 2014 at 2:10 PM

My real request is to get rid of the image dependencies, and instead use a vector image (or character/CSS icon) to make the rating scalable at any resolution (e.g. Retina).

There's a pure CSS icon for star at http://nicolasgallagher.com/pure-css-gui-icons/demo/ (search for "Save").

dandv wrote Feb 25, 2014 at 2:15 PM

Not having image files would ease packaging of the jquery-rating plugin for Meteor too (I saw the issue on GitHub and would love to repackage without image files).

gidon wrote Mar 4, 2014 at 3:26 PM

Currently you have two options:

1) embed the image as is as a data-uri url instead of a url to a file. Then you can remove the image all together from the pack. Won't help with the Retina issue.2) Embed an SVG file into the css, then it will be fully vector and this will fix the retina issue.

A black star: (copied from http://upload.wikimedia.org/wikipedia/commons/1/18/Five-pointed_star.svg)




I might in a future update, change the gif file, and move to svg only.