0.2.1 • Published 1 year ago

@webreflection/ascii-grid v0.2.1

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

@webreflection/ascii-grid

Probably the easiest way to define grids layouts.

// /component export also registers ascii-grid as Custom Element
// plus it allows any node to have a grid layout in it too.
import grid from '@webreflection/ascii-grid/component';
// CDN example: https://unpkg.com/@webreflection/ascii-grid/component

const template = document.createElement('template');
template.innerHTML = `
<!-- as custom element -->
<ascii-grid cols="10px 1fr 10px">
  <!--#
    a b c
  -->
  <div>a</div>
  <div>b</div>
  <div>c</div>
</ascii-grid>
<!-- as generic element -->
<div class="ascii-grid" cols="10px 1fr 10px">
  <!--#
    a b c
  -->
  <div>a</div>
  <div>b</div>
  <div>c</div>
</div>
<!-- with emptiness -->
<div class="ascii-grid" cols="10px 1fr 10px">
  <!--#
    a . b
  -->
  <div>a</div>
  <div>b</div>
</div>
</body>
`.trim();

document.body.appendChild(template.content);
0.2.1

1 year ago

0.2.0

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.0

1 year ago