ragrid.css
[grid] {
  display: flex;
  flex-wrap: wrap;
  contain: layout;
}
[grid][order~="reverse"] {
  flex-direction: row-reverse;
}
[grid][horizontally-aligned~="left"] {
  justify-content: flex-start;
}
[grid][horizontally-aligned~="center"] {
  justify-content: center;
}
[grid][horizontally-aligned~="right"] {
  justify-content: flex-end;
}
[grid][vertically-aligned~="top"] {
  align-items: flex-start;
}
[grid][vertically-aligned~="center"] {
  align-items: center;
}
[grid][vertically-aligned~="bottom"] {
  align-items: flex-end;
}
[grid][vertically-aligned~="baseline"] {
  align-items: baseline;
}
[grid][horizontally-distributed~="around"] {
  justify-content: space-around;
}
[grid][horizontally-distributed~="between"] {
  justify-content: space-between;
}
[grid][horizontally-distributed~="equal"] > * {
  flex-grow: 1;
}
[grid][vertically-distributed~="around"] {
  align-content: space-around;
}
[grid][vertically-distributed~="between"] {
  align-content: space-between;
}
[grid][vertically-distributed~="equal"] {
  align-items: stretch;
}
[grid][columns~="2"] > * {
  flex-basis: 50%;
}
[grid][columns~="3"] > * {
  flex-basis: 33.333333333333336%;
}
[grid][columns~="4"] > * {
  flex-basis: 25%;
}
[grid][columns~="5"] > * {
  flex-basis: 20%;
}
[grid][columns~="6"] > * {
  flex-basis: 16.666666666666668%;
}
[grid][columns~="7"] > * {
  flex-basis: 14.285714285714286%;
}
[grid][columns~="8"] > * {
  flex-basis: 12.5%;
}
[grid][columns~="9"] > * {
  flex-basis: 11.11111111111111%;
}
[grid][columns~="10"] > * {
  flex-basis: 10%;
}
[grid][columns~="11"] > * {
  flex-basis: 9.090909090909092%;
}
[grid][columns~="12"] > * {
  flex-basis: 8.333333333333334%;
}
[grid~="columns"][vertically-distributed~="equal"] {
  align-items: stretch;
}
[grid~="columns"][vertically-distributed~="equal"] > * {
  height: auto;
}
[grid~="rows"] {
  flex-direction: column;
  align-items: flex-start;
}
[grid~="rows"][order~="reverse"] {
  flex-direction: column-reverse;
}
[grid~="rows"][horizontally-aligned~="center"] {
  align-items: center;
}
[grid~="rows"][horizontally-aligned~="right"] {
  align-items: flex-end;
}
[grid~="rows"][vertically-distributed~="around"] {
  justify-content: space-around;
}
[grid~="rows"][vertically-distributed~="between"] {
  justify-content: space-between;
}
[grid~="rows"][vertically-distributed~="equal"] > * {
  width: initial;
}
[grid~="masonry"] {
  flex-flow: column wrap;
  height: 20rem;
}
