html2canvas icon indicating copy to clipboard operation
html2canvas copied to clipboard

CSS errors when using styled-components

Open shengchen-houzz opened this issue 1 year ago • 1 comments

Please make sure you are testing with the latest release of html2canvas. Old versions are not supported and issues reported for them will be closed.

Please follow the general troubleshooting steps first:

  • [x] You are using the latest version
  • [x] You are testing using the non-minified version of html2canvas and checked any potential issues reported in the console

Bug reports:

I'm working on printing out a table list with checkboxes. To customize the checkbox style, I use styled-components module as followed:

const StyledCheckbox = styled.input`
    &:checked {
        ${css({ bg: '#4DBC15' })}
    }
    ${css({ borderRadius: '50%' })}
`;

The ideal view should be like: 截圖 2024-07-30 中午12 06 31

However, the printed view is like: 截圖 2024-07-30 中午12 07 32

Specifications:

  • html2canvas version tested with: 1.4.1
  • Browser & version: Chrome 126.0.6478.127
  • Operating system: MacOS 14.5

shengchen-houzz avatar Jul 30 '24 04:07 shengchen-houzz

I would like to work on this issue. Please assign this to me

PartishtaP avatar Aug 08 '24 08:08 PartishtaP