wiki:docs_layout_rc

layout row column logic

  • each panel maintains a cursor
  • cursors are initialized to row 1, column 1
  • increment cursor column logic:
    • increment cursor column
    • if parent columns specified (not "auto")
      • if column cursor extends past number of columns
        • if row != same
          • increment cursor row
        • cursor column = 1
  • row can be #, span, next===undefined, same or full
  • column can be #, span, next===undefined or full
  • keys:
    • gc grid-column
    • gr grid-row
    • gtc grid-template-column
    • gtr grid-template-row

cases

  • row #, column #
    • gr = row #, gc = column #
    • cursor row = gr, cursor column = gc
    • increment cursor column
  • row #, column span
    • gr = row #, gc = column-span-start/column-span-end
    • cursor row = gr, cursor column = column-span-end
    • increment cursor column
  • row #, column next
    • gr = row #, gc = cursor column
    • cursor row = gr
    • increment cursor column
  • row #, column full
    • gr = row #, gc = 1/-1
    • cursor row = gr + 1, cursor column = 1
  • row span, column #
    • gr = row-span-start/row-span-end, gc = column #
    • cursor row = row-span-end, cursor column = gc
    • increment cursor column
  • row span, column span
    • gr = row-span-start/row-span-end, gc = column-span-start/column-span-end
    • cursor row = row-span-end, cursor column = column-span-end
    • increment cursor column
  • row span, column next
    • gr = row-span-start/row-span-end, gc = cursor column
    • cursor row = row-span-end
    • increment cursor column
  • row span, column full
    • gr = row-span-start/row-span-end, gc = 1/-1
    • cursor row = row-span-end + 1, cursor column = 1
  • row next, column #
    • gr = cursor row, gc = column #
    • increment cursor row, cursor column = 1
  • row next, column span
    • gr = cursor row, gc = column-span-start/column-span-next
    • increment cursor row, cursor column = 1
  • row next, column next
    • gr = cursor row, gc = cursor column
    • increment cursor row, cursor column = 1
  • row next, column full
    • gr = cursor row, gc = 1/-1
    • increment cursor row, cursor column = 1
  • row same, column #
    • gr = cursor row, gc = column #
    • cursor column = gc
    • increment cursor column(row=same)
  • row same, column span
    • gr = cursor row, gc = column-span-start/column-span-next
    • cursor column = col-span-end
    • increment cursor column(row=same)
  • row same, column next
    • gr = cursor row, gc = cursor column
    • increment cursor column(row=same)
  • row same, column full
    • disallowed, row filled
  • row full, column #
    • gr = 1/-1, gc = column #
    • cursor column = gc
    • increment cursor column(row=same)
  • row full, column span
    • gr = 1/-1, gc = column-span-start/column-span-end
    • cursor column = column-span-end
    • increment cursor column(row=same)
  • row full, column next
    • gr = 1/-1, gc = cursor column
    • increment cursor column(row=same)
  • row full, column full
    • disallowed, would take up full parent panel
Last modified 17 months ago Last modified on May 2, 2019, 5:05:40 AM