Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pinkhominid/wc-responsive-grid

Web component to simplify responsive content area layout using CSS Grid
https://github.com/pinkhominid/wc-responsive-grid

component container content css css-grid grid layout media queries query responsive wc web webcomponents

Last synced: about 1 month ago
JSON representation

Web component to simplify responsive content area layout using CSS Grid

Awesome Lists containing this project

README

        

# wc-responsive-grid

Web component to simplify responsive content area layout using CSS Grid.

[Container query](https://wicg.github.io/container-queries/) behavior provided by [wc-responsive-container](https://www.npmjs.com/package/wc-responsive-container).

## Install

```js
npm i wc-responsive-grid
```

## Example

```html

:root {
--wc-responsive-grid-gap: 2rem;
}
article {
width: 85%;
margin: 50px auto;
}
section {
background-color: lightgray;
outline: 3px dotted tomato;
padding: var(--wc-responsive-grid-gap);
}
wc-responsive-grid {
padding: var(--wc-responsive-grid-gap);
outline: 3px dotted skyblue;
}
wc-responsive-grid.lg > section {
min-height: 200px;
}

// Using @web/dev-server or your favorite bundler...
import 'wc-responsive-grid';




1


2






1


2


3


4






1


2


3






1


2


3


4






1


2


3


4


```

## Run Example

```sh
git clone [email protected]:pinkhominid/wc-responsive-grid.git
cd wc-responsive-grid
npm i
npm start
```