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

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

Loading…
Cancel
Save