Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Grid system is currently limited to columns only #23

Closed
openxthinking opened this issue Dec 6, 2021 · 0 comments
Closed

The Grid system is currently limited to columns only #23

openxthinking opened this issue Dec 6, 2021 · 0 comments
Assignees

Comments

@openxthinking
Copy link

openxthinking commented Dec 6, 2021

The Grid system is currently limited to columns and you can't work with rows making it useless for more complex layouts.

At the moment a layout like this can't be achieved easily.
complex-grid-example

something like this would be ideal:

  <x-grid columns="10">
    <x-col span="1+2" span-y="1-3">cell 1</x-col>
    <x-col span="3+2">cell 2</x-col>
    <x-col span="5+4">cell 3</x-col>
    <x-col span="9+2">cell 4</x-col>
    <x-col span="3+4">cell 5</x-col>
    <x-col span="7+4" span-y="2-3">cell 6</x-col>
    <x-col span="3-6">cell 7</x-col>
  </x-grid>

This is how much nesting and code you need to achieve the above layout
complex-grid-example-2

this is the code

  <x-grid class="debug" style="gap:1px">
      <x-col>
          <x-grid>
              <x-col>grid>cell>grid>cell</x-col>
          </x-grid>
      </x-col>
      <x-col span="2..">
          <x-grid class="debug" style="width:100%; gap:1px">
              <x-col span="1+1">grid>cell>grid>cell</x-col>
              <x-col span="2-3">grid>cell>grid>cell</x-col>
              <x-col span="4..">grid>cell>grid>cell</x-col>
              <x-col span="row">
                  <x-grid columns="2" class="debug" style="width:100%; gap:1px">
                      <x-col>
                          <x-grid class="debug" style="width:100%; gap:1px">
                              <x-col span="row">grid>cell>grid>cell>grid>cell>grid>cell</x-col>
                              <x-col span="row">grid>cell>grid>cell>grid>cell>grid>cell</x-col>
                          </x-grid>
                      </x-col>
                      <x-col>grid>cell>grid>cell>grid>cell</x-col>
                  </x-grid>
              </x-col>
          </x-grid>
      </x-col>
  </x-grid>
This was referenced Dec 9, 2021
@thagxt thagxt closed this as completed Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants