Giter VIP home page Giter VIP logo

component-image's People

Contributors

apaatsio avatar corygibbons avatar penx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

component-image's Issues

Fonts imported with @import are not loaded

I have fonts imported with CSS @import but the fonts are not in use in the generated image.

CSS:

@import url('https://fonts.googleapis.com/css?family=Merriweather');
h1 {
  font-family: 'Merriweather';
}

When I generate image with React component <h1>AaBbCc</h1> the imported font is not visible in the image.

Styled Components

Does this work with styled components? I tried providing the path to my styled component for stylesheet but the style doesn't get loaded.

Not able to render background image and fonts specified in css in screenshot

Hi @corygibbons,

I started using this lib for image comparision tests. My css has fonts and background images in it but while taking the screenshot both are missing. However normal static css is working fine. Can help with this?

my css looks like this:

.my_background_img {
background: url('placeholderimage.png') no-repeat;
}

this background is not getting applied in the html but all other css is getting applied.

Set delay before taking screenshot?

I'm working with a legacy component (that is itself a legacy D3 chart shoved into a React component and hacked together using refs). I'm unable to use component-image on it because the initial element is added to the DOM in the first run of render, but is not actually populated with a graph until componentDidMount runs. Therefore, I'm getting a blank screenshot.

Before I just bite the bullet and rewrite this crap (referring to my component), is there any way to set a small delay?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.