Giter Site home page Giter Site logo

Comments (5)

Templarian avatar Templarian commented on July 2, 2024

I make the assumption that most use a 16px root and the icons are 24dp at native 1:1 screens. So as you saw I apply scaling of 1 as 1.5rem (style="width: 1.5rem").

Since 99% of users are using these along with themes where 16px is the norm I think it might be best to keep this and let users override it with CSS.

I went back and forth on this, but will probably be following this in the Angular and VueTS components.

Are you using the icons at a smaller than 24px size?

from materialdesign-react.

azdanov avatar azdanov commented on July 2, 2024

Oh, I see.

Here are some examples on my website: https://azdanov.js.org/blog (WIP).

In menu larger, in meta information for posts smaller, and footer also small.

from materialdesign-react.

Templarian avatar Templarian commented on July 2, 2024

Yea, that kind of works, but I'm on a Surface Pro, so they look good on these high resolution displays).

For smaller icons you could just do <Icon path={mdiTag} size="1em"/>, or override it in CSS.

At work I'm mostly using <Icon size={1.5}/> for 36px, and <Icon size={2}/> for 48px. But I'm still targeting a lot of users on 1:1 displays.

from materialdesign-react.

azdanov avatar azdanov commented on July 2, 2024

I didn't know about size="1em". This resolves this issue for me.

Thanks!

from materialdesign-react.

Templarian avatar Templarian commented on July 2, 2024

Made it one of the unit tests:
https://github.com/Templarian/MaterialDesign-React/blob/master/tests/Icon.spec.tsx#L57

from materialdesign-react.

Related Issues (20)

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.