Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

V5 Add X and Bluesky icons, Fix bugs with BU-Hub icons, and change how FontAwesome Brand icons are handled #286

Merged
merged 5 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions burf-base/icons/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,23 @@
}
}

/*
* Load BU Default Icons font which is needed for a handful of icons not available
* in FontAwesome 5.
*/

@font-face {
font-family: "BU-Default-Icons";
src: url("https://www.bu.edu/cdn/fonts/icons/bu-default-icons/bu-default-icons.eot");
src: url("https://www.bu.edu/cdn/fonts/icons/bu-default-icons/bu-default-icons.eot?#iefix") format("embedded-opentype"),
url("https://www.bu.edu/cdn/fonts/icons/bu-default-icons/bu-default-icons.woff") format("woff"),
url("https://www.bu.edu/cdn/fonts/icons/bu-default-icons/bu-default-icons.ttf") format("truetype"),
url("https://www.bu.edu/cdn/fonts/icons/bu-default-icons/bu-default-icons.svg#bu-default-icons") format("svg");
font-style: normal;
font-weight: 400;
}


@import "mixins";

/*!
Expand Down Expand Up @@ -161,3 +178,9 @@ $print-icon-classes: false !default;
%icon-family-brands::before {
font-family: "Font Awesome 5 Brands";
}


%icon-family-budefault::before {
font-family: "BU-Default-Icons";
}

11 changes: 11 additions & 0 deletions burf-base/icons/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -181,5 +181,16 @@ $color-icons: unset !default;
} @else {
@error "`#{$name}` is not a supported icon. See www.bu.edu/cdn/fonts/icons/bu-default-icons/specimen-icons.html for a list of supported icons. If this is a custom icon you meant to add for your own icon font, be sure you've added it to the `$icons-theme` map.";
}

// Icons in the $icons-budefaulticons map need a different font-family and weight.
@if map-has-key( $icons-budefaulticons, $name ) {
font-family: "BU-Default-Icons";
font-weight: 400;

// Icons in the $icons-fontawesomebrands map need a different font-family and weight.
} @else if map-has-key( $icons-fontawesomebrands, $name ) {
font-family: "Font Awesome 5 Brands";
font-weight: 400;
}
}
}
Loading