-
Notifications
You must be signed in to change notification settings - Fork 2
Updating or Adding Icons to Sage
-
Work with Design to obtain an updated set of font files
- Design will create a zip file including all new versions of the
Sage.eot
,Sage.svg
,Sage.ttf
, andSage.woff
files.
- Design will create a zip file including all new versions of the
-
The new font files will need to be sent to the Sage Experience team to be uploaded to our CDN.
A new unicode list will need to be created and added to packages/sage-assets/lib/stylesheets/tokens/_icon.scss
.
The new list can be created by performing the following steps:
-
Open
style.css
file contained in the.zip
file that was delivered by design.Screenshot -
Delete
@font-face
and.icon-sage
fromstyle.css
file. Approx line 1-27.Screenshot -
Find/replace to remove
.icon-
from all propertiesFIND
.icon-
REPLACE:
Screenshot -
Find/replace to update
before {content: "\
tounicode(
FIND
before { content: "\
REPLACE: Note: unicode includes a space before
unicode(
Screenshot -
Find/replace to update
";}
to),
FIND
"; }
REPLACE:
),
Screenshot -
Remove the calendly items from the list
Screenshot -
You should now have the new list and can copy/paste it into
packages/sage-assets/lib/stylesheets/tokens/_icon.scss
.Screenshot
When a new icon set is generated the new font files will be uploaded to a new directory on the CDN. The $-icon-font-cdn-version
variable should be updated to match this new directory.
- Confirm new directory has been created on CDN with the Sage Experience team.
- Open
packages/sage-assets/lib/stylesheets/components/_icon.scss
- Update
$-icon-font-cdn-version
to match new CDN directory.
NOTE: Once the new files are in place and the CDN version is updated check the dev tools network panel to verify the fonts are being loaded from the new directory.
Network Panel |
---|
![]() |
- Add the new icon aliases in
./docs/lib/sage_rails/app/sage_components/sage_tokens.rb
. - Confirm that all icons and any new or revised ones appear in the docs site under Foundations > Icons.
- Add the new icon aliases in
./packages/sage-react/lib/configs/tokens/icons.js
. - Confirm these changes are reflected in Storybook under the Icon component by changing the
icon
prop to new or revised settings.
Thanks for using Sage!
Welcome
Conventions
Processes and Reference