Coder Social home page Coder Social logo

Include "Size" option about figma HOT 12 CLOSED

phosphor-icons avatar phosphor-icons commented on May 4, 2024
Include "Size" option

from figma.

Comments (12)

rektdeckard avatar rektdeckard commented on May 4, 2024 1

Hi @megaroeny, one of the reasons we ship our plugin assets unflattened is to allow greater design flexibility, IE the ability to recolor individual strokes and vector elements, and to tweak and modify icons. This is at odds with easily scaling the icons proportionally, but we think that it's a fair tradeoff to make to ask the designer to press "K" before scaling.

For the next release, we'll consider adding a flattened/unflattened option when importing from the plugin -- but I don't think manual sizing from within the plugin is the right solution. WDYT?

from figma.

rektdeckard avatar rektdeckard commented on May 4, 2024 1

Pixel-snapping is not really truly achievable with a variable-sized icon library, as I'm sure you know -- but we will be shipping a lot of subtle cleanup to improve snapping and sharpness at multiples of our key size (16px) in the next major release.

from figma.

megaroeny avatar megaroeny commented on May 4, 2024 1

Awesome no worries! Appreciate the hard work on these. We're switching over to your iconography for our design system at Khan Academy soon, so I'm looking forward to it.

from figma.

rektdeckard avatar rektdeckard commented on May 4, 2024 1

So Glad to hear it! I watched a lot of your YouTube content when I was getting started as a dev 😄

from figma.

rektdeckard avatar rektdeckard commented on May 4, 2024 1

Unfortunately Figma's built-in flatten tool is poorly implemented and does not often achieve the desired result with imported SVGs, so we're working on a software solution within the plugin to bring in natively-flattened assets.

from figma.

rektdeckard avatar rektdeckard commented on May 4, 2024 1

@megaroeny yes. I think there are some quirks (you may have to deselect the icon first), but hit K, then resize the icon by dragging from a corner. This will scale the strokes proportionally with the size, as the icons do in the browser.

Unfortunately, you cannot use the Width and Height fields in the Design inspector; this is a known issue in Figma, which several plugins have been created to address.

from figma.

megaroeny avatar megaroeny commented on May 4, 2024

@rektdeckard yup, totally get it! I could imagine it's a lot more work too. Another issue I saw (at least to me), was that when scaling the icons, a lot of times they aren't "pixel-fitted". So, for example, at 16 or 24px, sometimes edges end up at "sub-pixels" giving it a slightly blurry appearance. But having to pixel-fit every icon at every size is a lot of work. So again, I get it. 😄

from figma.

Simon-Renault avatar Simon-Renault commented on May 4, 2024

This would be amazing and could fix this issue with duotones icons :

  • The width of the stroke or the colour is often not maintained when using the icons as nested instances in a component. Only happens with duotone since the number of layers is inconsistent between icons. I believe flattening would solve that

from figma.

megaroeny avatar megaroeny commented on May 4, 2024

Unfortunately Figma's built-in flatten tool is poorly implemented and does not often achieve the desired result with imported SVGs, so we're working on a software solution within the plugin to bring in natively-flattened assets.

I've noticed this as well. Sometimes if I want to flatten an icon, the vector paths get all messed up. 😦

from figma.

megaroeny avatar megaroeny commented on May 4, 2024

@rektdeckard so am I doing this correctly in Figma for now, to represent how it renders in the browser?

  1. Import in Figma (via the plugin let's say)
  2. Press K to use the scale tool, and reduce to, let's say, 24x24
  3. If I inspect the stroke width in Figma now, it is reduced to 1.5 pixels.

Is that how to accurately represent the way it scales via code/in the browser?

from figma.

megaroeny avatar megaroeny commented on May 4, 2024

Unfortunately, you cannot use the Width and Height fields in the Design inspector; this is a known issue in Figma, which [several]

Perfect. Yup exactly what I do. But the inspector does have shortcuts now to resize by 0.5x, 0.75x, 2x, etc. So that's handy.

from figma.

rektdeckard avatar rektdeckard commented on May 4, 2024

Closing, as flattened icons solve resizing issues.

from figma.

Related Issues (4)

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.