|
1 | 1 | import { style } from "@vanilla-extract/css" |
| 2 | +import { borderWidth } from "polished" |
| 3 | +import { fonts, hsize, mediaQueries, radii, space, thickness, vspace } from "src/style/constants" |
| 4 | +import { media, onHover } from "src/style/utils" |
2 | 5 |
|
3 | 6 | export const card = style({ |
4 | 7 | width: "100%", |
5 | 8 | borderWidth: "1px", |
6 | 9 | borderStyle: "solid", |
7 | 10 | borderColor: "black", |
8 | | - borderRadius: "1em", |
9 | | - display: "flex", |
| 11 | + borderRadius: radii.medium, |
| 12 | + display: "grid", |
| 13 | + gridTemplateColumns: "fit-content(20%) minmax(50px,5fr)", |
| 14 | + gridTemplateRows: "fit-content(100%) fit-content(100%)", |
| 15 | + columnGap: space.medium, |
10 | 16 | }) |
11 | 17 |
|
12 | | -export const cardImage = style({ |
13 | | - width: "25%", |
14 | | - borderBottomLeftRadius: "inherit", |
15 | | - borderTopLeftRadius: "inherit", |
16 | | - margin: "0px", |
17 | | -}) |
18 | | - |
19 | | -export const cardHeader = style({}) |
| 18 | +export const cardImage = style([ |
| 19 | + { |
| 20 | + width: "100%", |
| 21 | + borderTopLeftRadius: "inherit", |
| 22 | + margin: "inherit", |
| 23 | + borderBottomLeftRadius: radii.none, |
| 24 | + gridRowStart: "1", |
| 25 | + gridColumnStart: "1", |
| 26 | + gridRowEnd: "span 1", |
| 27 | + gridColumnEnd: "span 1", |
| 28 | + }, |
| 29 | + media(mediaQueries.medium, { |
| 30 | + borderBottomLeftRadius: "inherit", |
| 31 | + gridRowEnd: "span 2", |
| 32 | + }) |
| 33 | +]) |
20 | 34 |
|
21 | | -export const cardText = style({ |
22 | | - marginLeft: "2em", |
23 | | - marginTop: "2em", |
24 | | - marginRight: "1em", |
| 35 | +export const cardHeader = style({ |
| 36 | + margin: "inherit", |
| 37 | + gridRowStart: "1", |
| 38 | + gridColumnStart: "2", |
| 39 | + gridRowEnd: "span 1", |
| 40 | + gridColumnEnd: "span 1", |
| 41 | + placeSelf: "center stretch", |
| 42 | + padding: space.small |
25 | 43 | }) |
| 44 | + |
| 45 | +export const cardText = style([ |
| 46 | + { |
| 47 | + margin: "inherit", |
| 48 | + gridRowStart: "2", |
| 49 | + gridColumnStart: "1", |
| 50 | + gridRowEnd: "span 1", |
| 51 | + gridColumnEnd: "span 2", |
| 52 | + placeSelf: "center stretch", |
| 53 | + fontFamily: fonts.header, |
| 54 | + borderTopWidth: thickness.thin, |
| 55 | + padding: space.small |
| 56 | + }, |
| 57 | + media(mediaQueries.medium, { |
| 58 | + gridRowStart: "2", |
| 59 | + gridColumnStart: "2", |
| 60 | + gridRowEnd: "span 1", |
| 61 | + gridColumnEnd: "span 1", |
| 62 | + placeSelf: "center stretch", |
| 63 | + borderTopWidth: thickness.none, |
| 64 | + }) |
| 65 | + |
| 66 | +]) |
0 commit comments