generated from visoftsolutions/ksox-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from visoftsolutions/4-develop-mobile-version-o…
…f-poc-leveraging-vanilla-extract 4 develop mobile version of poc leveraging vanilla extract
- Loading branch information
Showing
7 changed files
with
102 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export const breakpoints = { | ||
desktop: "768px", | ||
}; | ||
|
||
export const mediaQuery = { | ||
desktop: `screen and (min-width: ${breakpoints.desktop})`, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
import { type ComplexStyleRule, style } from "@vanilla-extract/css"; | ||
import { mediaQuery } from "~/breakpoint.css"; | ||
|
||
const mobile: ComplexStyleRule = { | ||
gridTemplateColumns: "repeat( auto-fit, minmax(60px, 1fr) )", | ||
gridTemplateRows: "none", | ||
}; | ||
|
||
const desktop: ComplexStyleRule = { | ||
gridTemplateColumns: "none", | ||
gridTemplateRows: "repeat(6, 1fr)", | ||
}; | ||
|
||
export const sidenav = style({ | ||
display: "grid", | ||
gap: "2px", | ||
justifyItems: "center", | ||
justifyContent: "center", | ||
"@media": { | ||
"screen and (min-width: 769px)": desktop, | ||
"screen and (max-width: 768px)": mobile, | ||
export const sidenav = style([ | ||
mobile, | ||
{ | ||
display: "grid", | ||
gap: "2px", | ||
justifyItems: "center", | ||
justifyContent: "center", | ||
"@media": { | ||
[mediaQuery.desktop]: desktop, | ||
}, | ||
}, | ||
}); | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
import { type ComplexStyleRule, style } from "@vanilla-extract/css"; | ||
import { mediaQuery } from "~/breakpoint.css"; | ||
import { vars } from "~/theme.css"; | ||
|
||
const mobile: ComplexStyleRule = { | ||
display: "none", | ||
gridTemplateColumns: "1fr", | ||
}; | ||
|
||
const desktop: ComplexStyleRule = { | ||
display: "block", | ||
gridTemplateColumns: "auto 1fr", | ||
}; | ||
|
||
export const header = style({ | ||
backgroundColor: vars.color.background, | ||
"@media": { | ||
"screen and (min-width: 769px)": desktop, | ||
"screen and (max-width: 768px)": mobile, | ||
export const header = style([ | ||
mobile, | ||
{ | ||
backgroundColor: vars.color.background, | ||
"@media": { | ||
[mediaQuery.desktop]: desktop, | ||
}, | ||
}, | ||
}); | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,27 @@ | ||
import { type ComplexStyleRule, style } from "@vanilla-extract/css"; | ||
import { mediaQuery } from "~/breakpoint.css"; | ||
import { vars } from "~/theme.css"; | ||
|
||
const mobile: ComplexStyleRule = { | ||
gridRowStart: "1", | ||
gridRowEnd: "2", | ||
gridColumnStart: "1", | ||
gridColumnEnd: "2", | ||
}; | ||
|
||
const desktop: ComplexStyleRule = { | ||
gridRowStart: "1", | ||
gridRowEnd: "2", | ||
gridColumnStart: "2", | ||
gridColumnEnd: "3", | ||
}; | ||
|
||
export const main = style({ | ||
backgroundColor: vars.color.background, | ||
"@media": { | ||
"screen and (min-width: 769px)": desktop, | ||
"screen and (max-width: 768px)": mobile, | ||
export const main = style([ | ||
mobile, | ||
{ | ||
backgroundColor: vars.color.background, | ||
"@media": { | ||
[mediaQuery.desktop]: desktop, | ||
}, | ||
}, | ||
}); | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,27 @@ | ||
import { type ComplexStyleRule, style } from "@vanilla-extract/css"; | ||
import { mediaQuery } from "~/breakpoint.css"; | ||
import { vars } from "~/theme.css"; | ||
|
||
const mobile: ComplexStyleRule = { | ||
gridRowStart: "2", | ||
gridRowEnd: "3", | ||
gridColumnStart: "1", | ||
gridColumnEnd: "2", | ||
}; | ||
|
||
const desktop: ComplexStyleRule = { | ||
gridRowStart: "1", | ||
gridRowEnd: "2", | ||
gridColumnStart: "1", | ||
gridColumnEnd: "2", | ||
}; | ||
|
||
export const nav = style({ | ||
backgroundColor: vars.color.background, | ||
"@media": { | ||
"screen and (min-width: 769px)": desktop, | ||
"screen and (max-width: 768px)": mobile, | ||
export const nav = style([ | ||
mobile, | ||
{ | ||
backgroundColor: vars.color.background, | ||
"@media": { | ||
[mediaQuery.desktop]: desktop, | ||
}, | ||
}, | ||
}); | ||
]); |