mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
fixed grid
This commit is contained in:
parent
e315b33284
commit
0e8d42095d
3 changed files with 27 additions and 14 deletions
|
@ -2,21 +2,33 @@ import * as React from 'react';
|
||||||
import { Cell } from "~/components/flow/Cell";
|
import { Cell } from "~/components/flow/Cell";
|
||||||
import { range } from 'ramda';
|
import { range } from 'ramda';
|
||||||
|
|
||||||
const style = require('./style.scss');
|
import * as styles from './styles.scss';
|
||||||
|
|
||||||
export const TestGrid = () => (
|
export const TestGrid = () => (
|
||||||
<div className={style.grid_test}>
|
<div className={styles.grid_test}>
|
||||||
<Cell
|
<div style={{
|
||||||
height={1}
|
gridRow: '1 / 2',
|
||||||
width={4}
|
gridColumn: '1 / -1',
|
||||||
title="Example cell Example cell Example cell Example cell Example cell Example cell Example cell "
|
background: 'green',
|
||||||
is_hero
|
}}
|
||||||
/>
|
>
|
||||||
|
HERO
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style={{
|
||||||
|
gridRow: '2 / 4',
|
||||||
|
gridColumn: '-2 / -1',
|
||||||
|
background: 'blue',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
STAMP
|
||||||
|
</div>
|
||||||
|
|
||||||
{
|
{
|
||||||
range(1,20).map(el => (
|
range(1,20).map(el => (
|
||||||
<Cell
|
<Cell
|
||||||
width={1}
|
width={Math.floor(Math.random() * 3)}
|
||||||
height={1}
|
height={Math.floor(Math.random() * 3)}
|
||||||
title="Example cell Example cell Example cell Example cell Example cell Example cell Example cell "
|
title="Example cell Example cell Example cell Example cell Example cell Example cell Example cell "
|
||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
|
|
|
@ -7,10 +7,12 @@ $cols: $content_width / $cell;
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid_test {
|
.grid_test {
|
||||||
width: $content_width;
|
//width: $content_width;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat($cols, 1fr);
|
//grid-template-columns: minmax($cell, 1fr);
|
||||||
grid-template-rows: $cell * 1.2 - 4;
|
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
||||||
|
//grid-template-columns: repeat($cols, 1fr);
|
||||||
|
//grid-template-rows: $cell * 1.2 - 4;
|
||||||
grid-auto-rows: 256px;
|
grid-auto-rows: 256px;
|
||||||
grid-auto-flow: row dense;
|
grid-auto-flow: row dense;
|
||||||
|
|
|
@ -11,5 +11,4 @@
|
||||||
.content {
|
.content {
|
||||||
flex: 0 1 $content_width;
|
flex: 0 1 $content_width;
|
||||||
position: relative;
|
position: relative;
|
||||||
background: red;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue