-
-
Notifications
You must be signed in to change notification settings - Fork 667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Guidelines vs Rules #650
Comments
I think you're definitely onto something, my two pennies on the matter: I think Feather and Lucide's guidelines are equally outdated. I completely agree that some guidelines should be marked as requirements/constraints and some should be marked as recommendations, and we do definitely need to add some extra guidelines for sake of consistency. As for our current guidelines, I think we can all agree that the following are trivial and must be defined as requirements:
aka:
As for the rest:
Since we're not dealing with typography here and in certain scenarios SVG images are simply unable to overflow to allow for overshoot (and accidental clipping is obviously not an option), for purely technical reasons we have two possible courses of action: In scenario A we need to fix icons that violate the (new) guidelines.
This is currently treated as a pretty loose recommendation, and should probably remain as such, but some icons might need some overhauling nonetheless to comply with this guideline better. E.g. there's no real reason why eraser doesn't have a 2px rounding: I also think a list of possible exceptions could be compiled, such as: "Exceptions may apply, e.g. when two separate objects meet at an angle, or when this added rounding would be highly detrimental to the perceptibility of the icon."
This is currently treated as a very strong recommendation, only allowing for incredibly minor violations (in the 0.1px range). Again, this is something that's obviously very necessary for proper support of either a 3px stroke width or a 12px size, otherwise separate elements would bleed into each other. Feather also has a few extra constraints and guidelines compared to Lucide:
I mean, yeah, we should probably also put this in writing. :)
I agree with @lscheibel that this is something that should be at the very least a recommendation and something that we strive for. Some other things I think would be worth putting in writing are:
I think this should be a no brainer, when used in toolbars, icons should appear in line regardless of orientation.
Like visual weight, this is hard to measure but would improve the overall harmony of the icon set. p.s. I didn't dwell too much on your example, as |
@lscheibel I agree partially with you on this. For how I see the guidelines is that we need to follow them much as possible but sometimes we can make exceptions. I think it is good we update some of the old icons. I agree on the part :
But this was also not really the case with some of the "old" icons from feather. So I think it is good we update them to improve visually balancing them out. aka "similar optical volumes" I agree with @karsa-mistmere we should update the current guidelines. Maybe with with a section recommended and rules as what @karsa-mistmere mentioned. What I not agree on is 1px save zone as a guideline instead of a rule. For example this drawing I made (normal styling: lucide 24px, 2px stroke). 1st icon applied the save zone rule. 2nd and 3th icon are the same, but the second one is in a frame "cropped" like how svgs icons are displayed in browsers But overal I think it is good we discuss this, and I'm open to suggestions to change these guidelines/rules, the current ones I created quickly to have some to reference to. But we can improve this definitely. Maybe we can also add some 'Dos' and 'Dont's'. To make things more clear. For the shopping-cart, I think we should update it to look better with others, I think we need to keep checking the icons side by side to keep consistency. So as we do in review for the new factory icon: #558 |
@karsa-mistmere I agree with almost all of your points. Btw I just chose the shopping-cart as an example because it was right next to the bigger one, the issue can be seen in quite a few places.
It would be nice to know if anybody actually uses them with a 3px stroke-width especially considering, that a lot of icons were clipping at this size up until recently.
Yes I agree here basically a 100%, however I think the example you chose also clearly shows where this rule/guideline meets its limits. @ericfennis Yes, the feather icons are not perfect either and some changes were easy no-brainer fixes that simply made sense (like the triangles).
However, in this example, doesn't this only happen when using the miter join? At least Chrome and Firefox (on Windows) seem to handle even circles that touch the edges of the svg viewbox nicely without clipping the interpolated pixel values. These are screenshots taken of the feather "cloud" icon from a 1366x768 display in Chrome. The other reason to make the "1px safe zone" a rule would be the 3px stroke variants. I love the fact that one can use the icons at a larger scale and reduce the stroke-width to a value that still results in a pixel perfect display of the icon. In fact most of them are gorgeous at double the resolution, albeit not as practical. When it comes to the 3px variant however, I've always thought of that as a gimmick. Most of the icons look pretty bad at 3px stroke width, beginning with actual interpolation issues where, due to the now not pixel perfect strokes, two touching lines add two half black pixels to a fully black one: Lucide "image" 24px - This is actually pretty noticeable when viewed at 100% I, therefore, would like to propose to disregard any issues stemming from increasing the stroke width above 2px. I would treat 3px as not officially supported but where it works, that's great. What do you think? |
@lscheibel: What I think is a pretty legit use case of a stroke width greater than 2px (it doesn't have to be 3px, anything greater than 2px will break) is using multiple sizes of icons while keeping the relative weights the same, e.g.: I've actually used Feather in one particular project just like this (24px/1.5px for menu items and buttons, 16px/2.25px for badges). |
@karsa-mistmere Sorry my wording wasn't clear there: I meant the 3px stroke width not the icon itself, this effect can be seen in a lot of icons, everywhere two lines intersect/touch. My guess is that Chrome renders each SVG element and then simply adds each pixel layer on another. Agreed, maintaining a consistent stroke width across different is a valid use-case but note that fonts also don't do this and the density of each icon actually increases dramatically. Additionally at least the 12px example looks blurry on my screen (if you wanted to stay on the pixel grid, you'd have to use this formula: However considering that GitHub doesn't use pixel perfect icons at all and keeps a consistent stroke width between its 16px and 24px icons I might be putting way too much emphasis on that point. |
If and when the guidelines are rewritten this thread should also be considered: #935 |
IMHO, the guideline that says "Distinct elements must have 2 pixels of spacing between each other" is a too strict/restrictive rule. Sometimes there are icons that work with 1px, 2px, 3px, and 4px strokes even if the spacing is 1px. So I would make it a recommendation instead of a strict rule. Or just split it into different rules:
An example: In this case, 3px+ can be used to make it look like a fill, but I agree that it makes the icon not look consistent in every size. |
Imitating fills with strokes is something that we do not allow, so it's a bit of a stretch to say that these "work". I could see merit in being looser with this guideline but this is definitely not the way to go. |
I understand, because the visuals are not consistent then, and it may be an unwanted behavior. |
This is a problem that has been here since the beginning and after seeing more icons being "fixed" (and doing so myself) I feel the need to get this out of my head. Please keep in mind, that this is only my opinion and I understand that not everybody will feel the same but maybe this can at least spark some discussion:
In my opinion, our guidelines should not be declared as rules.
I feel the guidelines have been interpreted too much as rules, instead of guiding principles. I understand that trying to define the "feather" look in text is difficult, but this is even more reason to not put too much weight on our design guide. This is also reflected in Coles answer when asked to declare guidelines which used the words constraints and guidelines and put a clear distinction between them.
Let's take for example the
shopping-cart
and theshopping-bag
icons:To me one icon looks smaller than the other. Now let's take a look at the feather icons:
To me, these feel much more balanced, even though the sides of the cart poke out of the "safe-zone". In the world of typography this is better known as overshoot and over at feathericons.com similar decisions have been made along a lot of icons in order to keep a consistent visual size between icons. Now we can't be as exact with it as type designers, after all we are constraint to a 24x24 (mostly) pixel-perfect grid, however I believe that this was the main motivation for what Cole Bemis called "similar optical volumes". In fact, this principle hasn't even made it into our rules and I would understand why: It is practically impossible to measure. It cannot be a rule because it is inherently just a blurry guideline. But as undefined it may be, I believe it is the main driver to keep a consistent set of icons.
Please do not take this as personal criticism of anybody. I myself have "verschlimmbessert" some icons in a very similar way but I thought I could at least write down my thoughts on this.
The text was updated successfully, but these errors were encountered: