Rating: decide on how to display stars
See original GitHub issueAs of today we are adding and
CSS classes but those classes are not part of Bootstrap’s CSS. We need to either:
- add dependency on an external lib / font
- include required classes as part of the wdiget
- use UTF character
- figure out sth else 😃
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Star Ratings - Formidable Forms
Determine how many stars you would like to display with the Maximum Rating option. It is very common to set the maximum to...
Read more >Five Methods for Five-Star Ratings | CSS-Tricks
Method 1: Using an image file. Using images means creating elements — at least 5 of them to be exact. Even if we're...
Read more >How to Show Star Rating On Google Search Results?
Featuring a star rating for your review article or product on search results is a complicated process, but Rank Math does all the...
Read more >How To Get Star Ratings To Show Up In Google Search Results
Download Fera Product Reviews FREE: ...
Read more >How To Get Star Ratings To Show Up In Google ... - Debutify
A star rating is an effective way of standing out on search engine results pages. Here are proven ways on how you can...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Let’s use UTF characters today. Swap it if needed to something else.
UTF characters have no dependencies and works fine. Better than adding one of those fonts and then realize we don’t want it.
I did a bit of research and as fast/ugly solution there are two entities ★ (★😉 and ☆ (☆😉 that seem to render for me in the IE9, IE11, Safari, Firefox. They look quite ugly in IE because of antialiasing though, but so do all other symbols.
Secondly, all the major icon providers render in the same way (from here):
<i class="fa fa-star"></i>
<i class="glyphicon glyphicon-star"></i>
<i class="mdi mdi-star"></i>
<i class="ion-star"></i>
<i class="fi-star"></i>
<i class="el el-star"></i>
So looks like giving the ability to simply specify ‘on’ and ‘off’ classes in the rating component would cover these use cases. And fallback to the mentioned characters if nothing specified. Plus there might be a global component configuration to avoid setting this on a per-instance basis
Another option would be to allow user to provide a template element, but this is an overkill I think.