Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Opting-in to the new EMBL/EMBL-EBI typeface on VF 1.x sites #149

Open
khawkins98 opened this issue Aug 19, 2019 · 1 comment
Open

Opting-in to the new EMBL/EMBL-EBI typeface on VF 1.x sites #149

khawkins98 opened this issue Aug 19, 2019 · 1 comment

Comments

@khawkins98
Copy link
Contributor

khawkins98 commented Aug 19, 2019

Agreed at higher-level design+leadership, EMBL and EMBL-EBI are moving to a new typeface: Plex. I won't get into the background on that here, but it has been discussed at length. (if needed, I'm sure I can find links)

That new font will be the default for VF 2.0, however what we've yet to iron out is:

  1. How can VF 1.x sites can opt-in to the new font? and
  2. If/when VF 1.1/2/3 are "forced" to the new font?

I think No. 2 isn't a near-term thing (and may never happen), so I think we can stick to No. 1.

Currently the "best" approach I have in mind is to create a new optional Sass file + standalone CSS file that can be included in a build process or HTML document.

To illustrate:

some-repo/theme__new-type-for-embl-ebi.css

h1, h2, p, all-the-selectors {
  font: "the-new-embl-ebi-font";
}
  • Pro: this is a super-simple opt-in.
  • Downside: more CSS inheritance/specificity and possible flash of helvetica -> plex

Final question is where would this new code live?

  • As part of VF 1.3?
  • ... or part of VF 2.0?

And then we'd need to go through and update various templates and documentation to reference the new approach.

@khawkins98
Copy link
Contributor Author

khawkins98 commented Sep 16, 2019

Have a proof-of-concept.

It works like this:

  1. It's a VF 2.0 component
  2. It's intended for use with vf 1.x sites
  3. Included by <link rel="stylesheet" href="https://dev.assets.emblstatic.net/embl-design-system/develop/assets/ebi-vf1-integration/ebi-vf1-integration.css" />
  4. Activated by adding .ebi-vf1-integration to a wrapping element or — ideally — doing body.ebi-vf1-integration

Here's a demonstration fo what the EBI Services page looks like using it: https://codepen.io/khawkins98/pen/KKPBYGy?editors=1000

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant