dreyescat / bootstrap-rating

Bootstrap Rating is a jQuery plugin that creates a rating control that uses Bootstrap glyphicons for rating symbols.
http://dreyescat.github.io/bootstrap-rating/
MIT License
192 stars 78 forks source link

CSS classes very generic #18

Closed ghost closed 8 years ago

ghost commented 8 years ago

The classes in your CSS are rather generic. I'm going to have to do some LESS "namespace trickery" to make sure they don't clash with any of the other classes in our rather large and complex site.

dreyescat commented 8 years ago

Do you mean the classes in bootstrap-rating.css? This file is not required. If you are not using those symbols you can even remove it. It is a simple example of custom symbol.

You can create your own symbols with your own class names as long as you use those names in the data-filled and data-empty properties. For example, a square rating symbol would be something like this:

.my-own-symbol {
    display: inline-block;
    border: 5px double white;
    width: 30px;
    height: 30px;
}

.my-own-symbol-empty {
    background-color: #ccc;
}

.my-own-symbol-filled {
    background-color: black;
}
<input type="hidden" class="rating" data-empty="my-own-symbol my-own-symbol-empty" data-filled="my-own-symbol my-own-symbol-filled" />

See it in action

dreyescat commented 8 years ago

Hope this answered the question :wink:.