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

perf: remove svg icon components and use css mask-image #4

Merged
merged 1 commit into from
Dec 10, 2023
Merged

Conversation

oriverk
Copy link
Owner

@oriverk oriverk commented Dec 10, 2023

related issues

Fixes #

Changes proposed in this pull request

  • remove svg icon components such as <GitHubIcon />, <XIcon /> ...
  • create a Icon component with css mask-image
<span class="icon github small" />
.icon {
    display: flex;
 }

 .icon::before {
    content: '';
    display: inline-block;
    mask: no-repeat center;
    mask-size: contain;
    background-color: currentColor;
 }

.small::before {
    width: 1rem;
    height: 1rem;
}

.github::before {
    mask-image: url('/assets/github.svg');
 }

the background (as memo)

@oriverk oriverk merged commit 3ce566e into main Dec 10, 2023
2 checks passed
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.

1 participant