Skip to content

[Bug]: css capture that doesn't display in all browsers #1249

@pauldambra

Description

@pauldambra

Preflight Checklist

  • I have searched the issue tracker for a bug report that matches the one I want to file, without success.

What package is this bug report for?

rrweb

Version

2.0.0-alpha.4

Expected Behavior

That captured CSS should display the same when applied to an element in a browser as it did when captured from it

Actual Behavior

A customer of ours (PostHog) is using some CSS to make titles on their page pretty

You can see the setup in this jsfiddle https://jsfiddle.net/pauldambra/k4rqm593/41/

In safari and firefox the CSS as captured by rrweb displays correctly when applied to an element in the fiddle. But in Chrome the captured CSS causes the text to appear to be invisible.

Screenshot 2023-07-05 at 15 44 37

I'm not certain this is a bug in rrweb to be honest. But would be great to get advice on if there's a workaround we can apply or suggest to the customer if not.

In the fiddle you can see that the CSS that is applied is

  background: linear-gradient(127.44deg, #C63A3A 32.29%, #3A2828 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;

rrweb captures that as

  background: linear-gradient(127.44deg, rgb(198, 58, 58) 32.29%, rgb(58, 40, 40) 100%) text;
  -webkit-text-fill-color: transparent;

That captured CSS works in Safari and Firefox but not in Chrome

Steps to Reproduce

see https://jsfiddle.net/pauldambra/k4rqm593/41/

Testcase Gist URL

No response

Additional Information

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions