Skip to content

[MdGridList] - Grid doesn't display at all on server with RatioTileStyler display strategy #6048

Closed
@jimjim2a

Description

@jimjim2a

Bug, feature request, or proposal:

On the server the MdGridList component doesn't display when using the RatioTileStyler strategy. It doesn't display because the applied styles are not valid properties name.

Specifically on the setRowStyles and getComputedHeight methods.

These methods define some styles to be applied on the tile, but the properties to be written are camelCase. On the browser this works well, but the server renderer writes theses properties inside the style attribute as they are.

Ex : style="marginTop: calc(((33.333333333333336% - ( 0px * 0.6666666666666666 )) + 0px) * 0);paddingTop:calc(((33.333333333333336% - ( 0px * 0.6666666666666666 )) * 1) + (0 * 0px));"

marginTop and paddingTop are not valid property names for the browser, therefore it ignore them.

What is the expected behavior?

The css properties should be written kebab-case to be correctly handled by the browser.

What is the current behavior?

What are the steps to reproduce?

What is the use-case or motivation for changing an existing behavior?

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Is there anything else we should know?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions