-
Notifications
You must be signed in to change notification settings - Fork 43
[PAY-1618] Update DogEar rendering and fix spacing #3775
Changes from all commits
9c09234
f2b57ec
d605ff1
8ed1a7d
a4edd56
ff77a8c
d111364
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,49 @@ | ||
.artistPick { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know why this class was named |
||
.container { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
z-index: 10; | ||
width: 80px; | ||
border-radius: var(--unit-2) 0px 0px 0px; | ||
width: var(--unit-12); | ||
height: var(--unit-12); | ||
pointer-events: none; | ||
overflow: hidden; | ||
} | ||
|
||
.container { | ||
.rectangle { | ||
position: absolute; | ||
transform: rotate(45deg) translateX(-64px); | ||
box-shadow: 1px 1px 7px -2px rgba(0, 0, 0, 0.5); | ||
width: 80px; | ||
height: 80px; | ||
overflow: hidden; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
|
||
/* Note: dogEarRectangle has multiple `path` elements, but we only want to fill one of them. | ||
That path uses `fill='currentColor'`, allowing us to set `color` here instead of `fill` */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice. |
||
.gated { | ||
background: var(--accent-blue); | ||
color: var(--accent-blue); | ||
} | ||
|
||
.purchase { | ||
background: var(--special-light-green); | ||
color: var(--special-light-green); | ||
} | ||
|
||
.star { | ||
background: linear-gradient(314.61deg, #7e1bcc 0%, #a22feb 100%); | ||
.artistPick { | ||
color: var(--secondary); | ||
} | ||
|
||
.hidden { | ||
background: linear-gradient(314.61deg, #858199 0%, #c2c0cc 100%); | ||
color: var(--neutral); | ||
} | ||
|
||
.matrix .container { | ||
background: var(--page-header-gradient); | ||
} | ||
|
||
.isMobile .container { | ||
transform: rotate(45deg) translateX(-68px); | ||
} | ||
|
||
.artistPick svg { | ||
.icon { | ||
position: absolute; | ||
left: 0; | ||
top: 0; | ||
margin-left: 5px; | ||
margin-top: 2px; | ||
top: var(--unit-1); | ||
left: var(--unit-1); | ||
width: var(--unit-4); | ||
height: var(--unit-6); | ||
} | ||
|
||
.isMobile svg { | ||
margin: 4px 0px 0px 4px; | ||
width: 16px; | ||
height: 16px; | ||
height: var(--unit-4); | ||
} | ||
|
||
.artistPick svg path { | ||
.icon path { | ||
fill: var(--static-white); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
.root { | ||
--border-width: 1px; | ||
display: flex; | ||
flex-direction: column; | ||
position: relative; | ||
border: 1px solid var(--neutral-light-8); | ||
border: var(--border-width) solid var(--neutral-light-8); | ||
border-radius: var(--unit-2); | ||
background-color: var(--white); | ||
transition: all var(--expressive); | ||
overflow: hidden; | ||
} | ||
|
||
.borderOffset { | ||
position: absolute; | ||
top: calc(-1 * var(--border-width)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Open to feedback on this pattern. My goal with this PR was to remove knowledge of the parent from DogEar. The place where we decide how far to offset a component to cover the border is the place that defines said border! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if someone overwrites There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you set a class or inline style on any component using this class, and within that class/style set If you were trying to do it from outside this module or the corresponding component, it might be a little trickier. But I think the idea is that this stays contained to only this module. |
||
left: calc(-1 * var(--border-width)); | ||
} | ||
|
||
.near { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: 'black'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was following another pattern for setting shadow, and also this value matches what is shown in Figma. Why the preference for the named color?