question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rating: decide on how to display stars

See original GitHub issue

As 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:closed
  • Created 7 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
Foxandxsscommented, Jul 5, 2016

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.

1reaction
maxokorokovcommented, Jul 4, 2016

I did a bit of research and as fast/ugly solution there are two entities ★ (&#9733😉 and ☆ (&#9734😉 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):

  • Font Awesome <i class="fa fa-star"></i>
  • Glyphicons <i class="glyphicon glyphicon-star"></i>
  • Material Design <i class="mdi mdi-star"></i>
  • Ionicons <i class="ion-star"></i>
  • Foundation Icon Fonts <i class="fi-star"></i>
  • Elusive Icons <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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found