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

Global: support font loading mechanism #8

Closed
ianmcburnie opened this issue Aug 29, 2017 · 7 comments
Closed

Global: support font loading mechanism #8

ianmcburnie opened this issue Aug 29, 2017 · 7 comments

Comments

@ianmcburnie
Copy link
Contributor

ianmcburnie commented Aug 29, 2017

Skin will set Market Sans by default in DS6 global module (EDIT: not true anymore, see thread)

To enable a font loader mechanism, let's add a Lasso flag that will bypass this setting. (EDIT: not true anymore, see thread)

https://github.com/eBay/ebay-font

@senthilp
Copy link
Contributor

@ianmcburnie Can we have the font loader as the default and use a flag as an override? I already checked with design team and they are also fine with it. Going forward we are going to advocate everyone to use the font loader if they want the Market Sans font

@ianmcburnie
Copy link
Contributor Author

@senthilp Yes, we can do it that way around if you prefer. I presume the font loader will be JS framework agnostic? Also this ticket has a dependency on the ebay-font-loader being moved over to open source.

For simple static web sites that cannot use a font loader, I think we will have to set Market San as the default though, but that will be via the CDN url.

@senthilp
Copy link
Contributor

Although the JavaScript of font loader is independent of any framework, the way we are exposing it is through a Marko tag. Since Marko also is open sourced, will it still be a concern?

I am fine with Market San being used explicitly in CDN url, as that is needed for static sites.

@ianmcburnie
Copy link
Contributor Author

Hmm, I think this is the original reason I wanted Market Sans set by default, without requiring configuration, so that we remain true to our "decoupled" philosophy. But maybe I'm taking that philosophy too far here? I guess we are already coupled to Lasso to a large extent for app usage.

I think the bottom line though is that we have to do what's best for our own eBay use case. So I will defer that decision to you :-)

@senthilp
Copy link
Contributor

We should keep that philosophy. Meanwhile, we will try to document it as such, that even without the Marko dependency we will be able to use the font loader. Will keep you posted.

@ianmcburnie ianmcburnie changed the title Global: allow Lasso flag to disable Market Sans by default Global: support font loading mechanism Sep 1, 2017
@ianmcburnie
Copy link
Contributor Author

ianmcburnie commented Sep 12, 2017

Blocked while we try and figure out if this goes against the design system guidance of Market Sans for 16px and over only:

eBay/ebay-font#8

@ianmcburnie
Copy link
Contributor Author

Okay, I'm going to set this as the default font-family for apps:

font-family: "Helvetica Neue", Helvetica, Arial, Roboto, sans-serif;

Meaning ebay-font will be required in order to load and set Market Sans in apps.

The CDN bundle used by Raptor and static sites (that cannot leverage ebay-font) will be:

font-family: "Market Sans", "Helvetica Neue", Helvetica, Arial, Roboto, sans-serif;

I don't think we need any Lasso flag now, if we do it this way around.

PR coming soon.

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

No branches or pull requests

3 participants