[PR #1359] [CLOSED] Add support for telephone country code flag references #1366

Closed
opened 2026-03-03 14:43:21 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/lipis/flag-icons/pull/1359
Author: @sulimanbenhalim
Created: 4/26/2025
Status: Closed

Base: mainHead: feature/tel-code-flags


📝 Commits (1)

  • bbe5c6b Add support for telephone country code flag references

📊 Changes

4 files changed (+797 additions, -274 deletions)

View changed files

📝 README.md (+9 -1)
📝 country.json (+543 -272)
📝 sass/_flag-icons-base.scss (+14 -0)
📝 sass/_flag-icons-list.scss (+231 -1)

📄 Description

Hi @lipis again, I added telephone country code support for the flags

Main changes:

  • Added ability to reference flags by international telephone code using .fi-tel-xx classes
  • Updated country.json with telephone codes for all countries
  • Created new SCSS mixin for generating telephone code classes
  • Handled duplicate telephone codes (like +1 for US/Canada) by choosing primary countries
  • Added example in README.md with usage documentation

For the telephone country codes, I used the data from:
https://github.com/datasets/country-codes/blob/main/data/country-codes.csv

This feature is super useful for apps that deal with international phone numbers - they can now show the right flag without having to convert telephone code to country code.

I made sure there are no duplicates in the SCSS mixins you can double check. The code should be fully backward compatible since it only adds new classes without changing existing ones

Thanks for this great library, and let me know what you think :)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/lipis/flag-icons/pull/1359 **Author:** [@sulimanbenhalim](https://github.com/sulimanbenhalim) **Created:** 4/26/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feature/tel-code-flags` --- ### 📝 Commits (1) - [`bbe5c6b`](https://github.com/lipis/flag-icons/commit/bbe5c6b7b38a85fd1a2d4d87b79f5b1556924982) Add support for telephone country code flag references ### 📊 Changes **4 files changed** (+797 additions, -274 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+9 -1) 📝 `country.json` (+543 -272) 📝 `sass/_flag-icons-base.scss` (+14 -0) 📝 `sass/_flag-icons-list.scss` (+231 -1) </details> ### 📄 Description Hi @lipis again, I added telephone country code support for the flags Main changes: * Added ability to reference flags by international telephone code using `.fi-tel-xx` classes * Updated country.json with telephone codes for all countries * Created new SCSS mixin for generating telephone code classes * Handled duplicate telephone codes (like +1 for US/Canada) by choosing primary countries * Added example in README.md with usage documentation For the telephone country codes, I used the data from: https://github.com/datasets/country-codes/blob/main/data/country-codes.csv This feature is super useful for apps that deal with international phone numbers - they can now show the right flag without having to convert telephone code to country code. I made sure there are no duplicates in the SCSS mixins you can double check. The code should be fully backward compatible since it only adds new classes without changing existing ones Thanks for this great library, and let me know what you think :) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 14:43:21 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/flag-icons#1366
No description provided.