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

Add aspect ratios for social images #256

Open
duner opened this issue Jan 6, 2017 · 5 comments
Open

Add aspect ratios for social images #256

duner opened this issue Jan 6, 2017 · 5 comments

Comments

@duner
Copy link

duner commented Jan 6, 2017

Feature request: In addition to the small/long chart sizes, it would be great to have aspect ratios optimized for sharing charts on Twitter and Facebook.

@yanofsky
Copy link
Contributor

yanofsky commented Jan 6, 2017

Do you know what those ratio are?

@duner
Copy link
Author

duner commented Jan 6, 2017

Sorry for not including in the original issue — meant to but then was running to grab lunch. Anyway, per Vox's meme tool (among other sources), Twitter is 2:1 and Facebook is 1.91:1.

@duner
Copy link
Author

duner commented Jan 6, 2017

If this is a feature y'all would rather not add to the core Chartbuilder tool, we can add it to our fork (and I'd be happy to spend some time figuring out how to implement it) but I figured y'all have a better handle on the codebase and would be better suited to getting something like this done.

@petulla
Copy link

petulla commented Jan 7, 2017

@duner I would also look into the cropping margins of those respective platforms, which are different. We've added support for these ARs to our CBs, with optimized margins.

@yanofsky
Copy link
Contributor

yanofsky commented Jan 8, 2017

I'd be happy to have these sizes in core Chartbuilder

You'd define the sizes in this config:
https://github.com/Quartz/Chartbuilder/blob/f0b18d2ac05f55b1231fda37ae3b7fc122f35f94/src/js/config/chart-sizes.js

Then add how they should be styled here:

.medium
.em-size
font-size $em_size
.d4
font-size $em_size
.margins
.line, .other-line
path
stroke-width 3px
.svg-text
font-size $em_size
&.svg-text-credit
font-size $em_size*0.6
&.svg-text-source
font-size $em_size*0.6
&.svg-text-title
font-size $em_size
.small
.em-size
font-size $em_size_small
.d4
font-size $em_size_small
.margins
.line, .other-line
path
stroke-width 2px
.svg-text
font-size $em_size_small
&.svg-text-credit
font-size $em_size*0.5
&.svg-text-source
font-size $em_size*0.5
&.svg-text-pipe
text
dominant-baseline central
font-size $em_size*0.6
&.svg-text-title
font-size $em_size_small
.svg-label-text
font-size $em_size_small
.large
.em-size
font-size $em_size
.d4
font-size $em_size
.margins
.line, .other-line
path
stroke-width 4px
.svg-text
font-size $em_size
&.svg-text-credit
font-size $em_size*0.6
&.svg-text-source
font-size $em_size*0.6
&.svg-text-title
font-size $em_size
.svg-label-text
font-size $em_size

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

3 participants