CU-CommunityApps / cwd_base

A lightweight Drupal 8+ theme, implementing Cornell Branding and standard CWD components.
1 stars 2 forks source link

update fontawesome to 5.x version #14

Open alisonjo315 opened 4 years ago

alisonjo315 commented 4 years ago

I think the 5.x version is already in use on a couple sites.....? (maybe SCL? -- and now we need to use it on Biotech)

Anyway, would be cool to update the version in the base theme, so we don't have to override it in child themes -- unless we're using the 4.x intentionally! (vs. there hasn't been time to update to 5.x)

alisonjo315 commented 4 years ago

@ama39 @orangekoi @dc774 @izhankov

Hi design friends! I hope I remembered all the design people on the "committee", if I forgot someone, please add them!

Anyway, maybe this task is something to consider including in the coming weeks/months of work on the framework and CD Demo?

ama39 commented 4 years ago

It's something we can consider, and I know there's interest. But I want to make sure everyone understands that FontAwesome 5 is a major change from 4. You might think about it like the equivalent of upgrading a site from Drupal 7 to 8. There are similarities between them and some backwards compatibility, but it's more "rebuild" than "upgrade." It's also not free, if we wanted to use its more advanced features, and the licensing involves page-views, number of seats, and maybe a limited number of sites. That would all have to be sorted out and financed.

The biggest difference is that FA5 uses JavaScript and renders icons as SVGs instead of font glyphs. This opens up helpful features (like duotone icons). But we have years of CSS and scripting that expect the font glyphs of v4. We also use Material Design font icons interchangeably with FontAwesome, so the two would become inconsistent with one another, which could be messy. I've also noticed that the SVG glyphs in v5 do not scale as expected when a user adjusts magnification in their browser. I'm not sure if it's intended. One of the characteristics of font-based icons is that they scale with typography. This is an assumption that has been leveraged extensively in our design systems.

So this would all be a lot of work to implement in our current framework and themes. I'm not actually aware of any of our projects using it. I know it's a common source of trouble in site support. I remember working on a ticket for the Chronicle site when FontAwesome in a Drupal module got updated to 5 and broke icons all over the site.