Skip to content

MatGridList wrong gutterSize handling #13647

@isametal88

Description

@isametal88

Bug, feature request, or proposal:

Bug

What is the expected behavior?

A coherent use of the property

What is the current behavior?

The component is not handling in a coherent way the gutterSize property.
Starting with a numeric positive value, it works.
Starting with 0 as a number, nothing is being rendered, while it is if the starting configuration is '0px'. Binding the value to a model, the behaviour is strange:

  • starting from 1 and going to 0, nothing happens.

  • Moving from 0 to -1, the gutter is removed.

  • Going back to 0 nothing changes

  • Going back to 1 the gutter is properly restored.

What are the steps to reproduce?

https://stackblitz.com/edit/angular-material2-issue-gxfazr

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

I'm building a nested grid, and I need to set the gutterSize to 0 in order to keep everything in the right place.

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

Angular 6.1.10
Angular Material 6.4.7
OS: Windows 10
TypeScript: 2.9.2
Browser: Chrome

Is there anything else we should know?

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions