Skip to content

Leftover float property in flexbox grid #260

@hudochenkov

Description

@hudochenkov

Example code from Flexbox Grid section in readme add rule with float. It's a workaround for browsers which doesn't support flex-wrap or it's just a mistake?

Before:

@lost flexbox flex;

section {
  lost-center: 980px;
}

div {
  lost-column: 1/3;
}

After:

section {
  display: flex;
  flex-flow: row wrap;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

div {
  flex: 0 0 auto;
  width: calc(99.99% * 1/3 - (30px - 30px * 1/3));
}

div:nth-child(1n) {
  margin-right: 30px;
}

div:last-child {
  margin-right: 0;
}

div:nth-child(3n) {
  float: right; /* ← this property and rule */
}

div:nth-child(3n) {
  margin-right: 0;
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions