-
-
Notifications
You must be signed in to change notification settings - Fork 23
refactor: Replace icon font with SVG icons #790
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
base: main
Are you sure you want to change the base?
Changes from all commits
18dd981
0729ca8
0475d95
879c125
278b330
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -135,7 +135,7 @@ menu > li > menu { | |
|
|
||
| &:hover, | ||
| &:focus { | ||
| :not(.material-symbols-rounded) { | ||
| :not(.a-icon) { | ||
| text-decoration: underline; | ||
| } | ||
| color: var(--link-hovered); | ||
|
|
@@ -150,7 +150,7 @@ menu > li > menu { | |
| display: none; | ||
| } | ||
|
|
||
| > .material-symbols-rounded { | ||
| > .a-icon { | ||
| margin-left: 0.8rem; | ||
| align-self: center; | ||
| text-decoration: none; | ||
|
|
@@ -233,6 +233,10 @@ menu > li > menu { | |
| &:hover { | ||
| color: var(--link-hovered); | ||
| } | ||
|
|
||
| > .a-icon { | ||
| font-size: 1.15em; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the icon is larger than before, it should be 20x20px |
||
| } | ||
| } | ||
|
|
||
| body:has(.o-header__nav--open) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -17,15 +17,19 @@ $search-z-index-focus: 12; | |||||
| position: relative; | ||||||
|
|
||||||
| &::before { | ||||||
| content: "search"; | ||||||
| content: ""; | ||||||
| display: block; | ||||||
| position: absolute; | ||||||
| top: 23px; | ||||||
| top: 22px; | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| left: 20px; | ||||||
| z-index: $search-z-index + 1; | ||||||
| font-family: "Material Symbols Rounded"; | ||||||
| width: 2.4rem; | ||||||
| height: 2.4rem; | ||||||
| background-color: currentColor; | ||||||
| mask: url("/icons/material-symbols-rounded/search.svg") no-repeat | ||||||
| center / contain; | ||||||
| opacity: 0.7; | ||||||
| pointer-events: none; | ||||||
| line-height: 1; | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
|
|
@@ -148,8 +152,13 @@ $search-z-index-focus: 12; | |||||
| } | ||||||
|
|
||||||
| .pagefind-ui__result-link::before { | ||||||
| content: "subdirectory_arrow_right"; | ||||||
| font-family: "Material Symbols Rounded"; | ||||||
| content: ""; | ||||||
| display: block; | ||||||
| width: 1.8rem; | ||||||
| height: 1.8rem; | ||||||
| background-color: currentColor; | ||||||
| mask: url("/icons/material-symbols-rounded/subdirectory_arrow_right.svg") | ||||||
| no-repeat center / contain; | ||||||
| position: absolute; | ||||||
| left: -2.4rem; | ||||||
|
Comment on lines
+155
to
163
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The icons are a little too high up. We should add: |
||||||
| } | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,9 @@ | ||
| <span | ||
| data-pagefind-ignore="all" | ||
| class="material-symbols-rounded" | ||
| class="a-icon" | ||
| translate="no" | ||
| aria-hidden="true" | ||
| data-icon="{{ . }}" | ||
| style="--icon-url: url('/icons/material-symbols-rounded/{{ . }}.svg');" | ||
| ></span> | ||
| {{- /* Needed, otherwise links break: https://github.com/fipguide/fipguide.github.io/issues/116 */ -}} |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the icon is smaller than before, it should be 20x20px
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the general size increase, it's now 17x17 vs 18x18 on my side. I do think it looks slightly better with the alignment:
Before:

After:

If you like the previous icon more, I can increase the font-size to 1.25em, then it's ~18px on my side again.