-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(chore): LESS maps instead of css overrides
This change switches from hardcoded icon selectors in icon.overrides to LESS maps in icon.variables so they are easily changeable in a different theme The previously extra handling of the "500px" class is not needed (in this script) anymore as it would break the LESS map generation and the conversion to "\35 00px" is now done in FUIs 2.9.0 icon.less file itself.
- Loading branch information
Showing
8 changed files
with
151 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "create-fomantic-icons", | ||
"version": "1.1.0", | ||
"description": "A simple CLI to generate the icon.overrides and icon.html.eco files for FUI", | ||
"version": "1.2.0", | ||
"description": "A simple CLI to generate the icon.variables and icon.html.eco files for FUI", | ||
"author": "Sean Hamilton <[email protected]>", | ||
"license": "MIT", | ||
"homepage": "https://github.com/fomantic/create-fomantic-icons#readme", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,182 +1,3 @@ | ||
/* | ||
* Font Awesome {{ version }} by @fontawesome [https://fontawesome.com] | ||
* License - https://fontawesome.com/license (Icons: CC BY 4.0 License, Fonts: SIL OFL 1.1 License, CSS: MIT License) | ||
*/ | ||
|
||
/******************************* | ||
|
||
Fomantic-UI integration of FontAwesome : | ||
|
||
// class names are separated | ||
i.icon.angle-left => i.icon.angle.left | ||
|
||
// variations are extracted | ||
i.icon.circle => i.icon.circle | ||
i.icon.circle-o => i.icon.circle.outline | ||
|
||
// abbreviation are replaced by full words | ||
i.icon.*-h => i.icon.*.horizontal | ||
i.icon.*-v => i.icon.*.vertical | ||
i.icon.alpha => i.icon.alphabet | ||
i.icon.asc => i.icon.ascending | ||
i.icon.desc => i.icon.descending | ||
i.icon.alt => i.icon.alternate | ||
|
||
|
||
Icons are order A-Z in their group, Solid, Outline, Thin (Pro only) and Brand | ||
|
||
Theme Overrides | ||
*******************************/ | ||
|
||
|
||
/******************************* | ||
Icons | ||
*******************************/ | ||
& when(@variationIconDeprecated) { | ||
/* Deprecated *In/Out Naming Conflict) */ | ||
i.icon.linkedin.in::before { content: "\f0e1"; } | ||
i.icon.zoom.in::before { content: "\f00e"; } | ||
i.icon.zoom.out::before { content: "\f010"; } | ||
i.icon.sign.in::before { content: "\f2f6"; } | ||
i.icon.in.cart::before { content: "\f218"; } | ||
i.icon.log.out::before { content: "\f2f5"; } | ||
i.icon.sign.out::before { content: "\f2f5"; } | ||
} | ||
|
||
{% if icons.solid.icons.length > 0 -%} | ||
& when(@variationIconSolid) { | ||
/******************************* | ||
Solid Icons | ||
*******************************/ | ||
|
||
/* Icons */ | ||
{% for icon in icons.solid.icons -%} | ||
i.icon.{{ icon.className }}::before { content: "{{ icon.unicode }}"; } | ||
{% endfor %} | ||
} | ||
{% if icons.solid.aliases.length > 0 -%} | ||
& when(@variationIconAliases) { | ||
/* Aliases */ | ||
{% for icon in icons.solid.aliases -%} | ||
i.icon.{{ icon.className }}::before { content: "{{ icon.unicode }}"; } | ||
{% endfor %} | ||
} | ||
{%- endif %}{%- endif %} | ||
|
||
{%- if icons.outline.icons.length > 0 %} | ||
& when (@variationIconOutline) { | ||
/******************************* | ||
Outline Icons | ||
*******************************/ | ||
|
||
/* Outline Icon */ | ||
& when (@importOutlineIcons) { | ||
/* Load & Define Icon Font */ | ||
@font-face { | ||
font-family: @outlineFontName; | ||
src: @outlineFallbackSRC; | ||
src: @outlineSrc; | ||
font-style: normal; | ||
font-weight: @normal; | ||
font-variant: normal; | ||
text-decoration: inherit; | ||
text-transform: none; | ||
} | ||
} | ||
|
||
i.icon.outline { | ||
font-family: @outlineFontName; | ||
} | ||
|
||
/* Icons */ | ||
{% for icon in icons.outline.icons -%} | ||
i.icon.{{ icon.className }}::before { content: "{{ icon.unicode }}"; } | ||
{% endfor %} | ||
|
||
{% if icons.outline.aliases.length > 0 -%} | ||
& when(@variationIconAliases) { | ||
/* Aliases */ | ||
{% for icon in icons.outline.aliases -%} | ||
i.icon.{{ icon.className }}::before { content: "{{ icon.unicode }}"; } | ||
{% endfor %} | ||
} | ||
{%- endif %} | ||
} | ||
{%- endif %} | ||
|
||
{% if icons.thin.icons.length > 0 -%} | ||
& when (@variationIconThin) { | ||
/******************************* | ||
Thin Icons | ||
*******************************/ | ||
|
||
/* Thin Icon */ | ||
& when (@importThinIcons) { | ||
/* Load & Define Icon Font */ | ||
@font-face { | ||
font-family: @thinFontName; | ||
src: @thinFallbackSRC; | ||
src: @thinSrc; | ||
font-style: normal; | ||
font-weight: @normal; | ||
font-variant: normal; | ||
text-decoration: inherit; | ||
text-transform: none; | ||
} | ||
} | ||
|
||
i.icon.thin { | ||
font-family: @thinFontName; | ||
} | ||
|
||
/* Icons */ | ||
{% for icon in icons.thin.icons -%} | ||
i.icon.{{ icon.className }}::before { content: "{{ icon.unicode }}"; } | ||
{% endfor %} | ||
|
||
{% if icons.thin.aliases.length > 0 -%} | ||
& when(@variationIconAliases) { | ||
/* Aliases */ | ||
{% for icon in icons.thin.aliases -%} | ||
i.icon.{{ icon.className }}::before { content: "{{ icon.unicode }}"; } | ||
{% endfor %} | ||
} | ||
{%- endif %} | ||
} | ||
|
||
{%- endif %} | ||
|
||
{% if icons.brand.icons.length > 0 -%} | ||
& when(@variationIconBrand) { | ||
/******************************* | ||
Brand Icons | ||
*******************************/ | ||
|
||
& when (@importBrandIcons) { | ||
/* Load & Define Brand Font */ | ||
@font-face { | ||
font-family: @brandFontName; | ||
src: @brandFallbackSRC; | ||
src: @brandSrc; | ||
font-style: normal; | ||
font-weight: @normal; | ||
font-variant: normal; | ||
text-decoration: inherit; | ||
text-transform: none; | ||
} | ||
} | ||
|
||
/* Icons */ | ||
{% for icon in icons.brand.icons -%} | ||
i.icon.{{ icon.className }}::before { content: "{{ icon.unicode }}"; font-family: @brandFontName; } | ||
{% endfor %} | ||
|
||
{% if icons.brand.aliases.length > 0 -%} | ||
& when(@variationIconAliases) { | ||
/* Aliases */ | ||
{% for icon in icons.brand.aliases -%} | ||
i.icon.{{ icon.className }}::before { content: "{{ icon.unicode }}"; font-family: @brandFontName; } | ||
{% endfor %} | ||
} | ||
{%- endif %} | ||
} | ||
{%- endif %} |
Oops, something went wrong.