Skip to content
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

Prettier svg code #41

Merged
merged 4 commits into from
Jan 26, 2024
Merged

Prettier svg code #41

merged 4 commits into from
Jan 26, 2024

Conversation

patrislav1
Copy link
Collaborator

This PR attempts to produce less verbose / more concise SVG code. The rendered graphics should stay the same.

BTW, I tried to make the background rects inherit height and y attributes from a parent <g> element, to reduce repetition, but apparently <g> can only impose a style to child elements, not coordinates or dimensions.

@@ -13,16 +13,26 @@
.bg {
stroke-width: "0.5px";
}
.bold {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice with classes like this if one wants to do custom styling 👍

@wader
Copy link
Owner

wader commented Jan 26, 2024

Looks great! tried it out with chrome on macOS and can't see any issues.

But i did notice a thing unrelated to this change (happens without this change also) that powerline.svg is rendered with wrong character dimensions until the windows is reiszed etc then it snaps to correct size... feels like browser bug?

@wader
Copy link
Owner

wader commented Jan 26, 2024

BTW, I tried to make the background rects inherit height and y attributes from a parent element, to reduce repetition, but apparently can only impose a style to child elements, not coordinates or dimensions.

Good to know!

@wader
Copy link
Owner

wader commented Jan 26, 2024

First
Screenshot 2024-01-26 at 17 14 46

After resize
Screenshot 2024-01-26 at 17 14 55

Weird and not sure i noticed it before. Anyway, not related to this PR

@patrislav1 patrislav1 merged commit 6710f70 into wader:master Jan 26, 2024
1 check passed
@patrislav1
Copy link
Collaborator Author

First Screenshot 2024-01-26 at 17 14 46

After resize Screenshot 2024-01-26 at 17 14 55

Weird and not sure i noticed it before. Anyway, not related to this PR

I also see it in both Chrome and Firefox; can't imagine this a browser bug in completely different browser engines 🤔

@wader
Copy link
Owner

wader commented Jan 26, 2024

I also see it in both Chrome and Firefox; can't imagine this a browser bug in completely different browser engines 🤔

Huh yes that seems unlikely

@patrislav1 patrislav1 deleted the prettier-svg branch January 27, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants