Code Monkey home page Code Monkey logo

Comments (4)

loeck avatar loeck commented on August 21, 2024

Hey !

It's just React stuff, React converte automatically some style attributes to px (as here: https://github.com/loeck/react-progress-circle2/blob/master/src/index.js#L55)

from react-progress-circle2.

benfluleck avatar benfluleck commented on August 21, 2024

This is alright i think it is CSS but this means I cannot specify a value of 6rem?

from react-progress-circle2.

loeck avatar loeck commented on August 21, 2024

Ah yes, I understand your issue, but I need a value in px, for calculate radius (see https://github.com/loeck/react-progress-circle2/blob/master/src/index.js#L40) based on circle size, I "think" if I use a size in em or rem I might have some issues.

from react-progress-circle2.

benfluleck avatar benfluleck commented on August 21, 2024

You could have separate logic for calculation of the SVG parameters and the div container surrounding it Or you can use an endsWith function in JS to strip of the words at the end.
This way we can specify a bunch of types you can handle. I think I pick the first option because the calculation of rem and maybe em is different from px.

from react-progress-circle2.

Related Issues (1)

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.