Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 470
refactor(ui): migrate Mosaic Card to StyleX#9292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
ab560c84ff280ba45fc863e5d932c53b67c39a52e87575e06acd3bddbcec0e56bdcfda60221b8bc430561248e1f3546d65f70d3bcFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| --- | ||
| --- |
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| import * as stylex from '@stylexjs/stylex'; | ||
| import { colorVars, radiusVars, space } from '../../tokens.stylex'; | ||
| export const styles = stylex.create({ | ||
| root: { | ||
| color: colorVars['--cl-color-card-foreground'], | ||
| display: 'flex', | ||
| flexDirection: 'column', | ||
| rowGap: space['5'], | ||
| width: '100%', | ||
| }, | ||
| header: { | ||
| paddingInline: space['4'], | ||
| display: 'flex', | ||
| flexDirection: 'column', | ||
| paddingBlockStart: space['5'], | ||
| }, | ||
| content: { | ||
| paddingInline: space['4'], | ||
| flexBasis: 'auto', | ||
| flexGrow: '1', | ||
| flexShrink: '1', | ||
| }, | ||
| footer: { | ||
| gap: space['2'], | ||
| paddingBlock: space['4'], | ||
| paddingInline: space['6'], | ||
| alignItems: 'center', | ||
| boxSizing: 'border-box', | ||
| display: 'flex', | ||
| flexShrink: 0, | ||
| justifyContent: 'space-between', | ||
| borderTopColor: colorVars['--cl-color-border'], | ||
| borderTopStyle: 'solid', | ||
| borderTopWidth: '1px', | ||
| width: '100%', | ||
| }, | ||
| }); | ||
| export const elevations = stylex.create({ | ||
| card: { | ||
| borderRadius: radiusVars['--cl-radius-container'], | ||
| overflow: 'hidden', | ||
| backgroundColor: colorVars['--cl-color-card'], | ||
| boxShadow: `0 12px 12px -7px light-dark(oklch(0.2046 0 0 / 12%), transparent), | ||
| 0 24px 24px -10px light-dark(oklch(0.2046 0 0 / 4%), transparent), | ||
| 0 0 0 1px light-dark(oklch(0.2046 0 0 / 4%), oklch(1 0 0 / 10%))`, | ||
| }, | ||
| flush: { | ||
| borderRadius: radiusVars['--cl-radius-container'], | ||
| overflow: 'visible', | ||
| backgroundColor: 'transparent', | ||
| boxShadow: 'none', | ||
| }, | ||
| overlay: { | ||
| borderRadius: radiusVars['--cl-radius-container'], | ||
| overflow: 'hidden', | ||
| backgroundColor: colorVars['--cl-color-card'], | ||
| boxShadow: `0 12px 12px -7px light-dark(oklch(0.2046 0 0 / 12%), transparent), | ||
| 0 24px 24px -10px light-dark(oklch(0.2046 0 0 / 4%), transparent), | ||
| 0 0 0 1px light-dark(oklch(0.2046 0 0 / 4%), oklch(1 0 0 / 10%))`, | ||
| }, | ||
| }); | ||
| export const headerAlignments = stylex.create({ | ||
| start: { | ||
| alignItems: 'flex-start', | ||
| textAlign: 'start', | ||
| }, | ||
| center: { | ||
| alignItems: 'center', | ||
| textAlign: 'center', | ||
| }, | ||
| }); | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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.
this a placeholder for now? or a backwards compatibility thing? (noticing it mirrors raised)
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.
So in the Figma, these currently mirror each other. I'd assume these eventually would differ?
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.
cool cool. yea I'm guessing so too 🤷 . so basically just a placeholder for now I guess while a shadowing system is still tbd
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 think we want to move away from that
0 0 0 1px oklch(0.2046 0 0 / 4%)shadow tho.. maybe worth syncing up with @stvhayes here