-
Notifications
You must be signed in to change notification settings - Fork 101
feat(user card) - Update User Card to SHINE styles (part 2) #2123
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
Changes from 77 commits
0f5b7af
a12c7c1
349b469
0bb346f
6365adb
ef94d69
e00d975
eb7c284
ab9794a
38b0d9b
87b78bc
16b09dc
87c4616
ea428f1
01b1e2c
97e14e4
823cda0
8a5f156
3fb74e9
7673568
81a0c75
039b5b2
8529c35
dadc853
8904436
0ce5ede
a511581
6d1903a
5695aeb
2013d0a
8eb40d7
69d7def
02a77e4
f0b7e06
e3f54b2
46358a6
ec62daf
6309348
7b56f01
5aa3985
2fa4977
365bcce
548541a
3b915e5
54b9265
4266e1d
ef984ac
9421ecb
b6f123e
fcee573
64d503b
69cf57d
ce8a728
7031764
415a856
b540635
cbad77e
b291b03
7b29dd4
ae4d022
c1d0ebc
ae0af0d
88d7153
026a10d
c8e299c
04d52f5
0e0ab06
027a9c6
bbcb6e5
45072c8
2f3f0b2
5fce2d9
60c8942
90f9b64
5a4f378
b4ac81d
081edf5
99eee8e
21f398d
19e6f7c
463b3d1
040a47e
2324455
786e263
1eb0119
0d9b08a
85db7b7
aa6ad30
dafc52b
791ad2b
82e22f8
cd7105e
74cde56
91fd792
89b911b
60c221d
8e24f16
29e9f7c
58cfe1b
6be0168
885b3dd
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 |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| "@stackoverflow/stacks": minor | ||
| "@stackoverflow/stacks-svelte": minor | ||
| --- | ||
|
|
||
| Update User Card to new SHINE design (part 2) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,12 @@ | |
| --_uc-group-gap: var(--su4); | ||
| --_uc-row-gap: var(--su6); | ||
| --_uc-username-fs: unset; | ||
| --_uc-username-p: unset; | ||
| --_uc-username-bl: unset; | ||
| --_uc-username-bg: unset; | ||
| --_uc-username-fc: unset; | ||
| --_uc-username-d: unset; | ||
| --_uc-username-ai: unset; | ||
|
|
||
| // VARIANTS | ||
| // SIZES | ||
|
|
@@ -26,6 +32,10 @@ | |
| --_uc-username-fs: var(--fs-body3); | ||
| } | ||
|
|
||
| &&__deleted { | ||
| --_uc-username-fc: var(--black-400); | ||
| } | ||
|
|
||
| // CHILD ELEMENTS | ||
| & &--bio { | ||
| .truncation(3); | ||
|
|
@@ -41,6 +51,13 @@ | |
| } | ||
| } | ||
|
|
||
| & &--recognition-additional-bling { | ||
| &, | ||
| & a { | ||
| color: var(--theme-primary); | ||
| } | ||
| } | ||
|
|
||
| & &--rep { | ||
| color: var(--black-600); | ||
| font-weight: 600; | ||
|
|
@@ -51,13 +68,42 @@ | |
| } | ||
|
|
||
| & &--username { | ||
| align-items: var(--_uc-username-ai); | ||
| background-color: var(--_uc-username-bg); | ||
| border-left: var(--_uc-username-bl); | ||
| color: var(--_uc-username-fc); | ||
| display: var(--_uc-username-d); | ||
| font-size: var(--_uc-username-fs); | ||
| font-weight: 500; | ||
| min-width: 0; | ||
| overflow-wrap: break-word; | ||
| padding: var(--_uc-username-p); | ||
| word-break: break-all; | ||
| } | ||
|
|
||
| &--username__op { | ||
| --_uc-username-p: var(--su2) var(--su4) var(--su2) var(--su4); | ||
| --_uc-username-bg: var(--blue-100); | ||
| --_uc-username-bl: var(--su4) solid var(--blue-300); | ||
| --_uc-username-d: flex; | ||
| --_uc-username-ai: center; | ||
| .s-user-card__sm & { | ||
| --_uc-username-p: 0px var(--su4); | ||
| } | ||
| } | ||
|
|
||
| & &--awarded-third { | ||
|
Contributor
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. How are those used? I cannot find them in the docs snippets?
Collaborator
Author
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. It's used to set the colors for the additional bling trophies. It's used in the awarded snippet like so
Contributor
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. Thanks for clarifying. I would like to get @dancormier opinions on the API naming here. There is a part of me that still wonder if this "additional blings" are worthy to be included already in the central library or we should just have the consumer define them for now and only centralize when we see the pattern is used across several scenarios (not just collectives). What I mean is that instead of creating a Also cc @CGuindon for visibility.
Contributor
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. By the way what I am suggesting is some version of the last responsible moment. Do we have enough confidence to nail the API at this stage, with the information and the use case we have or is it better to keep things flexible for the time being and defer centralization of some styling to a later moment.
Collaborator
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'm good with "just have the consumer define them for now" but I think we wanted @dancormier to weigh in as well
Contributor
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 would much prefer to push this onto the consumer as to not over complicate our API if we're not certain of our approach |
||
| color: var(--orange-400) | ||
| } | ||
|
|
||
| & &--awarded-second { | ||
| color: var(--blue-400) | ||
| } | ||
|
|
||
| & &--awarded-first { | ||
| color: var(--yellow-400) | ||
| } | ||
|
|
||
| // Layout specific | ||
| & &--column { | ||
| align-items: flex-start; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.