Skip to content

Bug: rrweb doesn't correctly serialize values for grid-template-areas #10705

@ryan953

Description

@ryan953

See also https://github.com/getsentry/team-replay/issues/382

I noticed that on my demo site i had a css class defined as:

.layout {
  display: grid;
  grid-template-areas:
    'img'
    'title'
    'desc';
  grid-template-rows: max-content;
  grid-template-columns: 1fr;
}

but when playing it back inside the replay (example replay) the css was instead:

.Media_layout__lkQuJ { display: grid; grid-template: "img" max-content / 1fr; }

^ this is the serialized css coming from the server.

Notice how the only grid-area defined is img. The other areas are automatically created, but not named, based on the definition max-content / 1fr which creates a 2 column, N row grid that gets filled in with children left-to-right, top-to-bottom.

The result is that the playback shows a different layout than what the user saw, things looking really broken inside the replay.

Metadata

Metadata

Assignees

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions