-
Notifications
You must be signed in to change notification settings - Fork 393
Feature: Icon Mixins #4031
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: dev
Are you sure you want to change the base?
Feature: Icon Mixins #4031
Changes from all commits
2e3f353
c7e204f
34455cc
914d03c
c669fc3
3b72f06
76f967d
b5a03de
535ec35
cc5ae43
c8b4d8b
b68232a
880122e
61dd5f6
aeace0e
96e4df0
d5db7f2
fb6139b
3f98cd4
1b7e0ec
31da54e
0494929
baddb9f
ed94961
0b8d625
072e19d
fe10f45
00036e8
af956a7
b4709c8
00e2ff1
d709a78
0e3c7bd
97c7fda
7c0c700
928725c
e8bdd52
9ab07a6
f6ece4f
b54cf04
055f22a
aa74aba
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 |
|---|---|---|
|
|
@@ -140,14 +140,20 @@ protected function mapIcon(string $name, $aliasTrail = []): array | |
| $rtl = $this->rtl ? '-rtl' : ''; | ||
| $icon = $this->iconMap[$name . $rtl] ?? $this->iconMap[$name] ?? $name; | ||
| $set = $this->defaultSet; | ||
| $class = null; | ||
|
|
||
| // Override set from config (ie. FontAwesome:icon) | ||
| if (str_contains($icon, ':')) { | ||
| $parts = explode(':', $icon, 3); | ||
| $parts = explode(':', $icon, 2); | ||
| $set = $parts[0]; | ||
| $icon = $parts[1]; | ||
| $class = $parts[2] ?? null; | ||
| } | ||
|
|
||
| // Special case classes | ||
| $class = null; | ||
| if (str_contains($icon, ':')) { | ||
| $parts = explode(':', $icon, 2); | ||
| $icon = $parts[0]; | ||
| $class = str_replace('.', ' ', $parts[1]); | ||
|
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. What is the purpose of this string replace? Is it worth adding a comment? |
||
| } | ||
|
|
||
| // Special case: aliases: | ||
|
|
||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| css/vendor/fontawesome-free-6 | ||
|
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. I don't think we need both top-level and mixin-level .gitignore files, if we need .gitignore at all (as discussed above). |
||
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.
Is .gitignore the only way to avoid thousands of files in these vendor directories? If so, this intersects with the discussions on #4591 about our general strategy for JS-adjacent dependencies. If not, can we just commit the smaller subset of needed files and not .gitignore vendor files at this time?
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.
I can remove this right before we merge so that all the files are in place.