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

Update typography to match Calypso. #307

Merged
merged 4 commits into from
Mar 4, 2016
Merged

Update typography to match Calypso. #307

merged 4 commits into from
Mar 4, 2016

Conversation

mattmiklic
Copy link
Contributor

This PR makes two changes:

Before:
screen shot 2016-03-03 at 8 32 22 pm

After:
screen shot 2016-03-03 at 8 31 09 pm

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<link href="https://fonts.googleapis.com/css?family=Merriweather:400,400italic,700,700italic|Open+Sans:400,700,400italic,700italic" rel="stylesheet" type="text/css">
<link href="https://s1.wp.com/i/fonts/merriweather/merriweather.css?v=20160212" rel="stylesheet" type="text/css">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently linked fonts can only be hosted at fast.fonts.net or fonts.googleapis.com so we'll have to use @font-face instead.

https://github.com/ampproject/amphtml/blob/master/spec/amp-html-format.md#custom-fonts

@@ -1,3 +1,5 @@
@import "https://s1.wp.com/i/fonts/merriweather/merriweather.css?v=20160212";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking @mjangda -- can we link to the fonts using an @import like this? If not, I can include the actual @font-face rules from merriweather.css here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly @import is a no-go with AMP too:

AMP validation had errors.
CSS syntax error in tag 'style amp-custom' - saw invalid at rule '@import'.

font-weight:700;
font-style:italic;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again @mjangda -- I've included all the @font-face rules from merriweather.css, except for the EOT font included for older versions of Internet Explorer, which I assumed that AMP pages probably don't need. Will this work?

@mjangda
Copy link
Contributor

mjangda commented Mar 4, 2016

Beautiful! Thanks @mattmiklic!

mjangda added a commit that referenced this pull request Mar 4, 2016
Update typography to match Calypso.
@mjangda mjangda merged commit 3d5c4ee into master Mar 4, 2016
@mjangda mjangda deleted the update/typography branch March 4, 2016 02:44
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

Successfully merging this pull request may close these issues.

2 participants