@ppci-mock/grid-view
v1.1.17
Published
Html grid
Downloads
2
Readme
Grid
Table of contents
Installation
NPM
npm i @ppci-mock/grid-view
// Polyfill: https://lit-element.polymer-project.org/guide/use#polyfills
npm i --save-dev @webcomponents/webcomponentsjs
Usage
Javascript
import '@ppci-mock/grid-view'
Browser
<!-- Default -->
<script type="module" src="https://cdn.jsdelivr.net/npm/@ppci-mock/grid-view/builds/index.min.js" />
<!-- Legacy -->
<script type="module" src="https://cdn.jsdelivr.net/npm/@ppci-mock/grid-view/builds/legacy.min.js" />
<!-- Component -->
<grid-view
rowSize=${String}
>
<slot></slot>
</grid-view>
Styling
grid-view {
--grid-columns: 4;
--grid--column-width: 1f;
/* Responsive */
@media (max-width: 600px) {
--grid-columns: 2;
}
}