Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Layout API not working if there's additional white-space in attribute #10426

@brikkelt

Description

@brikkelt

Actual Behavior:

  • What is the issue? * The value in a flex-gt-xs attribute is not picked up if there's additional white-space in the attribute (ie. flex-gt-xs="50 "), so no flex is applied to the element in question. The standard flex attribute does work, as do other variations (like flex-gt-sm, but I didn't test all of them however).

We encountered this after upgrading to Angular 1.6, which contains the 'don't trim white-space in attributes' commit (angular/angular.js@97bbf86), so that is probably happening here. What's strange is that it doesn't happen on all flex attribute variations.

  • What is the expected behavior? The trimmed attribute value being picked up. At least, I would expect all flex attribute variations to behave the same: choke on a sloppy attribute value or trim/tidy it and use it.

CodePen (or steps to reproduce the issue): *

  • CodePen Demo which shows your issue: http://codepen.io/brikkelt/pen/JEQmNv
  • Details: The demo shows a row with two 50% columns using the flex-gt-xs attribute. The second column is broken because of additional white-space in the attribute.

Angular Versions: *

  • Angular Version: 1.6
  • Angular Material Version: 1.1.1 - 1.1.3

Additional Information:

  • Browser Type: *
  • Browser Version: *
  • OS: *
  • Stack Traces:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions