Comments (6)
Support for displaying half-star ratings via .starability-result
might be useful for displaying average ratings. It's not necessary to make support for submitting half-star ratings, since that would be at the same time more complex to implement as well as harder to use.
Here are the changes needed to make it happen:
@import "starability/starability-scss/starability/growRotate";
.starability-result {
$star-count-result: $star-count - 1;
@while $star-count-result > 0 {
&[data-rating="#{$star-count-result}.5"]::after {
width: $star-count-result * $star-size + $star-size / 2;
}
$star-count-result: $star-count-result - 1;
}
}
from starability.
Hi @hkhuu1011 ,
I don't think I am going to ship it as a part of library. You can see my answer to a sub-rating question some time ago: #9
from starability.
Yep, I need it as well. I must display an average of submitted results. It could be even more flexible / precise than just a half star. Thanks @mislav.
from starability.
I am closing the Issue as the support won't be added in the library, but I pointed @mislav comment as a solution in the README.
from starability.
Hello!
Sorry, newbie here.
Where exactly can I put the code @mislav shared to make static display of floating number working ?
Thanks!
from starability.
@zacBkh you can put it in your own CSS anywhere as long as it will come in your stylesheet after CSS from the library,
from starability.
Related Issues (20)
- Rating starts with yellow stars instead of grey stars HOT 6
- Invisible input creates accessibility issue HOT 2
- Touch gesture support HOT 3
- Star size HOT 3
- Focus ring is not demonstrated in example HTML HOT 1
- Better support for `disabled` attribute. HOT 3
- Stars invisible in high contrast mode HOT 5
- Regarding stability star 10 rating HOT 2
- On Mac voice over, it announces you are currently on radio button, X of 6. HOT 3
- Node throws SyntaxError: Unexpected token '.' for npm package css HOT 1
- Change size of stars? HOT 2
- ItΒ΄s possible to select half stars? HOT 1
- Problem when decreasing the size HOT 1
- Spacing between the stars
- Dosn't work in 2021? HOT 3
- Can't print the stars in page HOT 1
- fixing required in starability-heartbeat.css
- Multiple ratings on same page HOT 1
- Responsive Star Size HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from starability.