@fylgja/auto-grid
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -9,2 +9,6 @@ # Changelog | ||
## [1.1.1] - 2022-11-05 | ||
### Fixed | ||
- imports for PostCSS import [#121](https://github.com/fylgja/fylgja/issues/121) | ||
## [1.1.0] - 2022-07-24 | ||
@@ -11,0 +15,0 @@ ### Added |
{ | ||
"name": "@fylgja/auto-grid", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "A super small grid with auto flowing behavior based on the container size. Using a similar method to container queries", | ||
@@ -20,10 +20,7 @@ "homepage": "https://fylgja.dev/", | ||
"fylgja component", | ||
"grid", | ||
"cascade-layer" | ||
"grid" | ||
], | ||
"scripts": { | ||
"build:layer": "npx sass layer.scss layer.css --no-source-map -s compressed -I node_modules", | ||
"build:main": "npx sass auto-grid.scss auto-grid.css --no-source-map -s compressed -I node_modules", | ||
"build": "npm run build:layer && npm run build:main" | ||
"build": "npx sass --no-source-map -s compressed -I node_modules src:./" | ||
} | ||
} |
@@ -33,2 +33,13 @@ # Fylgja - Auto Grid | ||
### `@layer` support | ||
If you need support for `@layer`, | ||
use the following import; | ||
```scss | ||
@use "@fylgja/auto-grid" with ($enable-auto-grid-layer: true); | ||
// Or via PostCSS import | ||
@import "@fylgja/auto-grid/layer"; | ||
``` | ||
## How to use | ||
@@ -39,10 +50,10 @@ | ||
```html | ||
<div class="auto-grid"> | ||
<div>..</div> | ||
<div>..</div> | ||
<div class="auto-grid" style="max-width: 880px;"> | ||
<img width="500" height="400" src="https://placeimg.com/500/400/nature?img=1" loading="lazy"> | ||
<img width="500" height="400" src="https://placeimg.com/500/400/nature?img=2" loading="lazy"> | ||
</div> | ||
``` | ||
In this example we have a container thats `800px` width, | ||
using a default col size of `250px` this wil result in 3 equal columns, | ||
In this example we have a container thats `880px` width, | ||
using a default col size of `250px` this wil result in 3 equal columns, | ||
even if there are only 2 child's to fill the space. | ||
@@ -49,0 +60,0 @@ The third one is an empty placeholder, making the grid truly auto. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
5776
94