Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
49c31ddf
Unverified
Commit
49c31ddf
authored
Aug 24, 2022
by
Charles Bachmeier
Committed by
GitHub
Aug 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: update sprinkles breakpoints (#4480)
update breakpoints Co-authored-by:
Charlie
<
charlie@uniswap.org
>
parent
44242058
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
41 additions
and
44 deletions
+41
-44
Navbar.css.ts
src/components/NavBar/Navbar.css.ts
+1
-1
Navbar.tsx
src/components/NavBar/Navbar.tsx
+1
-1
SearchBar.css.ts
src/components/NavBar/SearchBar.css.ts
+2
-2
SearchBar.tsx
src/components/NavBar/SearchBar.tsx
+9
-9
Card.css.ts
src/nft/components/collection/Card.css.ts
+3
-3
CollectionNfts.css.ts
src/nft/components/collection/CollectionNfts.css.ts
+1
-1
CollectionStats.css.ts
src/nft/components/collection/CollectionStats.css.ts
+4
-4
CollectionStats.tsx
src/nft/components/collection/CollectionStats.tsx
+3
-3
Banner.css.ts
src/nft/components/explore/Banner.css.ts
+3
-3
sprinkles.css.ts
src/nft/css/sprinkles.css.ts
+13
-16
useIsMobile.ts
src/nft/hooks/useIsMobile.ts
+1
-1
No files found.
src/components/NavBar/Navbar.css.ts
View file @
49c31ddf
...
...
@@ -20,7 +20,7 @@ export const nav = style([
export
const
logoContainer
=
style
([
sprinkles
({
display
:
'
flex
'
,
marginRight
:
{
mobile
:
'
12
'
,
desktopX
l
:
'
20
'
},
marginRight
:
{
sm
:
'
12
'
,
xx
l
:
'
20
'
},
alignItems
:
'
center
'
,
}),
])
...
...
src/components/NavBar/Navbar.tsx
View file @
49c31ddf
...
...
@@ -65,7 +65,7 @@ const Navbar = () => {
const
{
pathname
}
=
useLocation
()
const
nftFlag
=
useNftFlag
()
if
(
windowWidth
&&
windowWidth
<
breakpoints
.
desktopX
l
)
{
if
(
windowWidth
&&
windowWidth
<
breakpoints
.
x
l
)
{
return
<
MobileNavbar
/>
}
...
...
src/components/NavBar/SearchBar.css.ts
View file @
49c31ddf
...
...
@@ -8,14 +8,14 @@ const DESKTOP_NAVBAR_WIDTH = '360px'
const
baseSearchStyle
=
style
([
sprinkles
({
paddingY
:
'
12
'
,
width
:
{
mobile
:
'
viewWidth
'
},
width
:
{
sm
:
'
viewWidth
'
},
borderStyle
:
'
solid
'
,
borderWidth
:
'
1px
'
,
borderColor
:
'
medGray
'
,
}),
{
'
@media
'
:
{
[
`screen and (min-width:
${
breakpoints
.
tabletS
m
}
px)`
]:
{
[
`screen and (min-width:
${
breakpoints
.
s
m
}
px)`
]:
{
width
:
DESKTOP_NAVBAR_WIDTH
,
},
},
...
...
src/components/NavBar/SearchBar.tsx
View file @
49c31ddf
...
...
@@ -318,15 +318,15 @@ export const SearchBar = () => {
setSearchValue
(
''
)
},
[
pathname
])
const
isMobile
=
useMemo
(()
=>
windowWidth
&&
windowWidth
<=
breakpoints
.
tabletS
m
,
[
windowWidth
])
const
isMobile
=
useMemo
(()
=>
windowWidth
&&
windowWidth
<=
breakpoints
.
s
m
,
[
windowWidth
])
return
(
<>
<
Box
position=
{
{
mobile
:
isOpen
?
'
absolute
'
:
'
relative
'
,
tabletSm
:
'
relative
'
}
}
top=
{
{
mobile
:
'
0
'
,
tabletSm
:
'
unset
'
}
}
left=
{
{
mobile
:
'
0
'
,
tabletSm
:
'
unset
'
}
}
width=
{
{
mobile
:
isOpen
?
'
viewWidth
'
:
'
auto
'
,
tabletSm
:
'
auto
'
}
}
position=
{
{
sm
:
isOpen
?
'
absolute
'
:
'
relative
'
,
md
:
'
relative
'
}
}
top=
{
{
sm
:
'
0
'
,
md
:
'
unset
'
}
}
left=
{
{
sm
:
'
0
'
,
md
:
'
unset
'
}
}
width=
{
{
sm
:
isOpen
?
'
viewWidth
'
:
'
auto
'
,
md
:
'
auto
'
}
}
ref=
{
searchRef
}
style=
{
{
zIndex
:
'
1000
'
}
}
>
...
...
@@ -335,16 +335,16 @@ export const SearchBar = () => {
borderRadius=
{
isOpen
?
undefined
:
'
12
'
}
borderTopRightRadius=
{
isOpen
&&
!
isMobile
?
'
12
'
:
undefined
}
borderTopLeftRadius=
{
isOpen
&&
!
isMobile
?
'
12
'
:
undefined
}
display=
{
{
mobile
:
isOpen
?
'
flex
'
:
'
none
'
,
desktopX
l
:
'
flex
'
}
}
display=
{
{
sm
:
isOpen
?
'
flex
'
:
'
none
'
,
xx
l
:
'
flex
'
}
}
justifyContent=
{
isOpen
||
phase1Flag
===
NftVariant
.
Enabled
?
'
flex-start
'
:
'
center
'
}
onFocus=
{
()
=>
!
isOpen
&&
toggleOpen
()
}
onClick=
{
()
=>
!
isOpen
&&
toggleOpen
()
}
gap=
"12"
>
<
Box
display=
{
{
mobile
:
'
none
'
,
tabletSm
:
'
flex
'
}
}
>
<
Box
display=
{
{
sm
:
'
none
'
,
md
:
'
flex
'
}
}
>
<
MagnifyingGlassIcon
/>
</
Box
>
<
Box
display=
{
{
mobile
:
'
flex
'
,
tabletSm
:
'
none
'
}
}
color=
"placeholder"
onClick=
{
toggleOpen
}
>
<
Box
display=
{
{
sm
:
'
flex
'
,
md
:
'
none
'
}
}
color=
"placeholder"
onClick=
{
toggleOpen
}
>
<
ChevronLeftIcon
/>
</
Box
>
<
Box
...
...
@@ -359,7 +359,7 @@ export const SearchBar = () => {
value=
{
searchValue
}
/>
</
Row
>
<
Box
display=
{
{
mobile
:
isOpen
?
'
none
'
:
'
flex
'
,
desktopX
l
:
'
none
'
}
}
>
<
Box
display=
{
{
sm
:
isOpen
?
'
none
'
:
'
flex
'
,
xx
l
:
'
none
'
}
}
>
<
NavIcon
onClick=
{
toggleOpen
}
>
<
NavMagnifyingGlassIcon
width=
{
28
}
height=
{
28
}
/>
</
NavIcon
>
...
...
src/nft/components/collection/Card.css.ts
View file @
49c31ddf
...
...
@@ -11,7 +11,7 @@ export const card = style([
boxSizing
:
'
border-box
'
,
WebkitBoxSizing
:
'
border-box
'
,
'
@media
'
:
{
[
`(max-width:
${
breakpoints
.
tabletS
m
-
1
}
px)`
]:
{
[
`(max-width:
${
breakpoints
.
s
m
-
1
}
px)`
]:
{
'
:hover
'
:
{
borderColor
:
themeVars
.
colors
.
medGray
,
cursor
:
'
pointer
'
,
...
...
@@ -48,7 +48,7 @@ export const button = style([
width
:
'
full
'
,
position
:
'
relative
'
,
paddingY
:
'
8
'
,
marginTop
:
{
mobile
:
'
8
'
,
tabletSm
:
'
10
'
},
marginTop
:
{
sm
:
'
8
'
,
md
:
'
10
'
},
marginBottom
:
'
12
'
,
borderRadius
:
'
12
'
,
border
:
'
none
'
,
...
...
@@ -78,7 +78,7 @@ export const marketplaceIcon = style([
export
const
erc1155ButtonRow
=
sprinkles
({
flexShrink
:
'
0
'
,
gap
:
'
12
'
,
marginTop
:
{
mobile
:
'
8
'
,
tabletSm
:
'
10
'
},
marginTop
:
{
sm
:
'
8
'
,
md
:
'
10
'
},
marginBottom
:
'
12
'
,
})
...
...
src/nft/components/collection/CollectionNfts.css.ts
View file @
49c31ddf
...
...
@@ -6,7 +6,7 @@ export const assetList = style([
sprinkles
({
display
:
'
grid
'
,
marginTop
:
'
24
'
,
gap
:
{
mobile
:
'
8
'
,
tablet
:
'
12
'
,
tabletXl
:
'
20
'
},
gap
:
{
sm
:
'
8
'
,
md
:
'
12
'
,
lg
:
'
20
'
},
}),
{
gridTemplateColumns
:
'
repeat(auto-fill, minmax(160px, 1fr) )
'
,
...
...
src/nft/components/collection/CollectionStats.css.ts
View file @
49c31ddf
...
...
@@ -5,12 +5,12 @@ import { breakpoints, sprinkles } from '../../css/sprinkles.css'
export
const
statsText
=
style
([
sprinkles
({
marginTop
:
{
mobile
:
'
8
'
,
tabletSm
:
'
40
'
},
marginBottom
:
{
mobile
:
'
0
'
,
tabletSm
:
'
28
'
},
marginTop
:
{
sm
:
'
8
'
,
md
:
'
40
'
},
marginBottom
:
{
sm
:
'
0
'
,
md
:
'
28
'
},
}),
{
'
@media
'
:
{
[
`(max-width:
${
breakpoints
.
tabletS
m
-
1
}
px)`
]:
{
[
`(max-width:
${
breakpoints
.
s
m
-
1
}
px)`
]:
{
marginLeft
:
'
68px
'
,
},
},
...
...
@@ -38,7 +38,7 @@ export const collectionImage = style([
verticalAlign
:
'
top
'
,
top
:
'
-118px
'
,
'
@media
'
:
{
[
`(max-width:
${
breakpoints
.
tabletS
m
-
1
}
px)`
]:
{
[
`(max-width:
${
breakpoints
.
s
m
-
1
}
px)`
]:
{
width
:
'
60px
'
,
height
:
'
60px
'
,
borderWidth
:
'
2px
'
,
...
...
src/nft/components/collection/CollectionStats.tsx
View file @
49c31ddf
...
...
@@ -137,7 +137,7 @@ const CollectionName = ({
</
Box
>
{
isVerified
&&
<
VerifiedIcon
style=
{
{
width
:
'
32px
'
,
height
:
'
32px
'
}
}
/>
}
<
Row
display=
{
{
mobile
:
'
none
'
,
tabletSm
:
'
flex
'
}
}
display=
{
{
sm
:
'
none
'
,
md
:
'
flex
'
}
}
alignItems=
"center"
justifyContent=
"center"
marginLeft=
"32"
...
...
@@ -211,7 +211,7 @@ const CollectionDescription = ({ description }: { description: string }) => {
},
[
descriptionRef
,
baseRef
])
return
(
<
Box
ref=
{
baseRef
}
marginTop=
{
{
mobile
:
'
12
'
,
tabletSm
:
'
16
'
}
}
style=
{
{
maxWidth
:
'
680px
'
}
}
>
<
Box
ref=
{
baseRef
}
marginTop=
{
{
sm
:
'
12
'
,
md
:
'
16
'
}
}
style=
{
{
maxWidth
:
'
680px
'
}
}
>
<
Box
ref=
{
descriptionRef
}
className=
{
clsx
(
styles
.
description
,
styles
.
nameText
,
readMore
&&
styles
.
descriptionOpen
)
}
...
...
@@ -248,7 +248,7 @@ const StatsRow = ({ stats, isMobile, ...props }: { stats: GenieCollection; isMob
const
floorPriceStr
=
ethNumberStandardFormatter
(
stats
.
floorPrice
)
return
(
<
Row
gap=
{
{
mobile
:
'
20
'
,
tabletSm
:
'
60
'
}
}
{
...
props
}
>
<
Row
gap=
{
{
sm
:
'
20
'
,
md
:
'
60
'
}
}
{
...
props
}
>
<
StatsItem
label=
"Items"
isMobile=
{
isMobile
??
false
}
>
{
totalSupplyStr
}
</
StatsItem
>
...
...
src/nft/components/explore/Banner.css.ts
View file @
49c31ddf
...
...
@@ -3,8 +3,8 @@ import { breakpoints, sprinkles } from 'nft/css/sprinkles.css'
export
const
section
=
style
([
sprinkles
({
paddingLeft
:
{
mobile
:
'
16
'
,
desktopL
:
'
0
'
},
paddingRight
:
{
mobile
:
'
16
'
,
desktopL
:
'
0
'
},
paddingLeft
:
{
sm
:
'
16
'
,
xl
:
'
0
'
},
paddingRight
:
{
sm
:
'
16
'
,
xl
:
'
0
'
},
}),
{
maxWidth
:
'
1000px
'
,
...
...
@@ -63,7 +63,7 @@ export const collectionDetails = style([
}),
{
'
@media
'
:
{
[
`screen and (min-width:
${
breakpoints
.
tabletL
}
px)`
]:
{
[
`screen and (min-width:
${
breakpoints
.
md
}
px)`
]:
{
width
:
'
40%
'
,
},
},
...
...
src/nft/css/sprinkles.css.ts
View file @
49c31ddf
...
...
@@ -235,27 +235,24 @@ const borderWidth = ['1px', '1.5px', '2px', '4px']
const
borderStyle
=
[
'
none
'
,
'
solid
'
]
as
const
export
const
breakpoints
=
{
tabletSm
:
656
,
tablet
:
708
,
tabletL
:
784
,
tabletXl
:
830
,
desktop
:
948
,
desktopL
:
1030
,
desktopXl
:
1260
,
sm
:
640
,
md
:
768
,
lg
:
1024
,
xl
:
1280
,
xxl
:
1536
,
xxxl
:
1920
,
}
const
layoutStyles
=
defineProperties
({
conditions
:
{
mobile
:
{},
tabletSm
:
{
'
@media
'
:
`screen and (min-width:
${
breakpoints
.
tabletSm
}
px)`
},
tablet
:
{
'
@media
'
:
`screen and (min-width:
${
breakpoints
.
tablet
}
)`
},
tabletL
:
{
'
@media
'
:
`screen and (min-width:
${
breakpoints
.
tabletL
}
px)`
},
tabletXl
:
{
'
@media
'
:
`screen and (min-width:
${
breakpoints
.
tabletXl
}
px)`
},
desktop
:
{
'
@media
'
:
`screen and (min-width:
${
breakpoints
.
desktop
}
px)`
},
desktopL
:
{
'
@media
'
:
`screen and (min-width:
${
breakpoints
.
desktopL
}
px)`
},
desktopXl
:
{
'
@media
'
:
`screen and (min-width:
${
breakpoints
.
desktopXl
}
px)`
},
sm
:
{},
md
:
{
'
@media
'
:
`screen and (min-width:
${
breakpoints
.
sm
}
px)`
},
lg
:
{
'
@media
'
:
`screen and (min-width:
${
breakpoints
.
md
}
px)`
},
xl
:
{
'
@media
'
:
`screen and (min-width:
${
breakpoints
.
lg
}
px)`
},
xxl
:
{
'
@media
'
:
`screen and (min-width:
${
breakpoints
.
xl
}
px)`
},
xxxl
:
{
'
@media
'
:
`screen and (min-width:
${
breakpoints
.
xxl
}
px)`
},
},
defaultCondition
:
'
mobile
'
,
defaultCondition
:
'
sm
'
,
properties
:
{
alignItems
:
flexAlignment
,
alignSelf
:
flexAlignment
,
...
...
src/nft/hooks/useIsMobile.ts
View file @
49c31ddf
...
...
@@ -4,7 +4,7 @@ import { useEffect, useState } from 'react'
const
isClient
=
typeof
window
===
'
object
'
function
getIsMobile
()
{
return
isClient
?
window
.
innerWidth
<
breakpoints
.
tabletS
m
:
false
return
isClient
?
window
.
innerWidth
<
breakpoints
.
s
m
:
false
}
export
function
useIsMobile
():
boolean
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment