GithubHelp home page GithubHelp logo

Comments (2)

ekeric13 avatar ekeric13 commented on June 3, 2024

So the widgetDimensions would make the svg element 20% of it's container, which by default has no width and there isn't a prop to set that.

widgetSpacings affects the padding, but it would be hard to get the stars perfectly aligned on one row as you are affecting the padding, and not the width.

I could create a widgetContainerDimensions prop which would get you partially there (affect the width of the svg container so you can set that to 20%), but you would still need to add in some more custom css.

I suggest ignoring inline styles and just creating your own css. Or maybe keeping the inline styles but add to the defaults via normal css

.widget-ratings {
	width: 100%;
	display: flex;
	justify-content: space-between;
}

Because I am supporting older browsers it would be a lot of work to get it to be evenly spaced on one line, but if you can use flex than it should be pretty easy to do so.

Would that fix your issue?

from react-ratings-declarative.

glassblowerscat avatar glassblowerscat commented on June 3, 2024

When I try to add to the defaults with normal CSS as you suggest, my CSS gets overwritten by the default. I can set properties that the defaults don't set, but I can't overwrite the defaults (e.g., display: flex). I tried with a simple .css file import and with a module. How would one go about adding to the baked-in CSS?

from react-ratings-declarative.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.