Fix export alpha padding issue

main
Jake Dexheimer 7 years ago committed by Jake Dexheimer
parent 70e9e40811
commit 5ecb19c6b6

@ -219,19 +219,22 @@ class Carbon extends React.Component {
return ( return (
<div id="section"> <div id="section">
{content} <div id="export-container">
{content}
<div id="twitter-png-fix" />
</div>
<style jsx>{` <style jsx>{`
#section { #section,
#export-container {
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
#section::after { /* forces twitter to save images as png — https://github.com/dawnlabs/carbon/issues/86 */
content: ''; #twitter-png-fix {
position: absolute;
bottom: 0;
height: 1px; height: 1px;
width: 100%; width: 100%;
background: rgba(0, 0, 0, 0.01); background: rgba(0, 0, 0, 0.01);

@ -95,7 +95,7 @@ class Editor extends React.Component {
} }
getCarbonImage() { getCarbonImage() {
const node = document.getElementById('section') const node = document.getElementById('export-container')
const config = { const config = {
style: { style: {

Loading…
Cancel
Save