mirror of
https://github.com/lipis/flag-icons.git
synced 2026-04-26 09:25:50 +03:00
[GH-ISSUE #1024] does this still function? I've installed with npm using react btw, used the classes just like in description but nothing happens. #479
Labels
No labels
3rd-party
3rd-party
bug
code
documentation
enhancement
fixed-in-master
flag-request
help needed
missing-flag
missing-flag
pull-request
wrong-flag
wrong-flag
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/flag-icons#479
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @formidabilus on GitHub (Jul 28, 2022).
Original GitHub issue: https://github.com/lipis/flag-icons/issues/1024
I'm using it like this:
<span className="fi fi-gr"></span>@plneto commented on GitHub (Jul 29, 2022):
Don't forget to import the css file as well. e.g.
import "/node_modules/flag-icons/css/flag-icons.min.css";@m0wglii commented on GitHub (Aug 17, 2022):
I have similiar issues using flag-icons in an angular-context.
After running npm i --include=dev flag-icons I tried the following:
in Angular.json I had put the path in the styles section.
"styles": [ "./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css", "./node_modules/flag-icons/css/flag-icons.min.css", "src/styles.scss" ],Trying to get a flag visible with this, not working.
<span class="fi fi-in"></span>Tried
@import "./node_modules/flag-icons/css/flag-icons.min.css";in my styles.scss. Tried the same in the .scss related to a specific component where I want the flags to show up. Any ideas?@karinerock commented on GitHub (Aug 17, 2022):
You also need to add a width and height on the icon.
You also need to make sure that the parent has a display: flex.
In my case, these two points was the missing CSS attribute that prevented the icon to show...
@lipis commented on GitHub (Aug 19, 2022):
I'm not familiar with angular.. but maybe it's better to use the https://github.com/lipis/flag-icons/tree/main/sass instead? You'll need to include the flags folder and point to it via https://github.com/lipis/flag-icons/blob/main/sass/_variables.scss#L1
@anhtungbui commented on GitHub (Aug 24, 2022):
@m0wglii I'm Angular dev here, no problem using the library so far. The only thing I did was importing the minified CSS file into the
angular.jsonfile:Restart the compiler and
<span class="fi fi-eu"></span>should work.@formidabilus commented on GitHub (Aug 24, 2022):
I didn't try anymore, I will close this issue.