<div class="wc-grid">
    <div class="wc-grid-item ">
        <header>
            <h3>Optional card heading</h3>
        </header>
        <p>Grid card content goes here.</p>
    </div>
    <div class="wc-grid-item ">
        <header>
            <h3>Optional card heading</h3>
        </header>
        <p>Grid card content goes here.</p>
    </div>
    <div class="wc-grid-item ">
        <header>
            <h3>Optional card heading</h3>
        </header>
        <p>Grid card content goes here.</p>
    </div>
    <div class="wc-grid-item ">
        <header>
            <h3>Optional card heading</h3>
        </header>
        <p>Grid card content goes here.</p>
    </div>
</div>
<div class="wc-grid">
  {{#> @partial-block}}
    {{> @wc-grid-item}}
    {{> @wc-grid-item}}
    {{> @wc-grid-item}}
    {{> @wc-grid-item}}
  {{/ @partial-block}}
</div>
/* No context defined. */
  • Content:
    /**
     * Wine cellar card grid
     */
    
    @media screen {
    
      /**
       * Wine cellar grid
       */
      @supports (display: grid) {
    
        .wc-grid {
          display: grid;
          grid-gap: 1rem;
          align-items: start;
          grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
        }
    
        .wc-grid > * {
          margin-top: 0;
        }
      }
    
      /* Inventory grid item */
      .wc-grid-item {
        display: flex;
        flex-direction: column;
        margin-top: 0;
        background-color: var(--white);
        padding: 1rem;
        box-shadow: var(--card-shadow);
        transition: transform 300ms ease-in-out;
      }
    
      .wc-grid-item.edit-mode {
        transform: scale(1.03);
      }
    
      .wc-grid-item form {
        height: 100%;
        display: flex;
        flex-direction: column;
      }
    
      .wc-grid-item form > *:last-child {
        margin-top: auto;
      }
    
      /* Inventory header */
      .wc-grid-item header {
        position: relative;
      }
    
      .wc-grid-item header > * {
        margin: 0;
      }
    
      .wc-grid-item .origin-type {
        margin-top: 0.25rem;
        display: flex;
        justify-content: space-between;
      }
    
      .wc-grid-item .origin-type > * {
        margin-top: 0;
      }
    
      /* Inventory table */
      .wc-grid-table {
        margin: 1rem 0;
        width: 100%;
      }
    
      .wc-grid-table tr:nth-child(even) {
        background-color: transparent;
      }
    
      .wc-grid-table th,
      .wc-grid-table td {
        vertical-align: middle;
      }
    
      .wc-grid-table th {
        padding-left: 0;
      }
    
      .wc-grid-table th,
      .wc-grid-table label {
        font-weight: 400;
        text-align: left;
      }
    
      .wc-grid-table td {
        text-align: right;
      }
    
      .wc-grid-table input {
        max-width: 8ch;
        text-align: right;
      }
    
      /* Grid item actions (usually buttons) */
      .grid-item-actions {
        margin-top: auto;
        display: flex;
        justify-content: flex-end;
      }
    }
    
  • URL: /components/raw/wc-grid/wc-grid.css
  • Filesystem Path: components/03_organisms/wc-grid/wc-grid.css
  • Size: 1.8 KB

Wine cellar grid

Used for the card view for both the wine cellar page as well as the wine cellar inventory page.