misuzu/assets/misuzu.css/user/usercard.css

161 lines
3.1 KiB
CSS
Raw Normal View History

2022-09-13 13:14:49 +00:00
.usercard {
display: flex;
transition: box-shadow .5s;
z-index: 1;
color: #fff;
background-color: var(--background-colour);
2023-07-19 18:14:04 +00:00
box-shadow: 0 1px 2px var(--background-colour-translucent-6);
2022-09-13 13:14:49 +00:00
}
.usercard:hover {
2023-07-19 18:14:04 +00:00
box-shadow: 0 1px 4px var(--background-colour-translucent-6);
2022-09-13 13:14:49 +00:00
z-index: 2;
}
2023-07-19 18:14:04 +00:00
2022-09-13 13:14:49 +00:00
.usercard__background {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: var(--accent-colour) var(--background-pattern);
background-blend-mode: multiply;
}
2023-07-19 18:14:04 +00:00
.usercard__link {
2022-09-13 13:14:49 +00:00
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
2023-07-19 18:14:04 +00:00
.usercard__avatar {
box-sizing: content-box;
width: 50px;
height: 50px;
2022-09-13 13:14:49 +00:00
z-index: 20;
2023-07-19 18:14:04 +00:00
padding: 8px;
2022-09-13 13:14:49 +00:00
pointer-events: none;
2023-07-19 18:14:04 +00:00
flex-grow: 0;
flex-shrink: 0;
2022-09-13 13:14:49 +00:00
}
2023-07-19 18:14:04 +00:00
.usercard__details {
pointer-events: none;
display: flex;
flex-direction: column;
justify-content: center;
overflow: hidden;
flex-grow: 1;
flex-shrink: 1;
2022-09-13 13:14:49 +00:00
}
2023-07-19 18:14:04 +00:00
.usercard__details__username {
font-size: 1.4em;
line-height: 1.4em;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
2022-09-13 13:14:49 +00:00
}
2023-07-19 18:14:04 +00:00
.usercard__details__title {
2022-09-13 13:14:49 +00:00
font-size: .9em;
line-height: 1.2em;
}
2023-07-19 18:14:04 +00:00
.usercard__details__country {
2022-09-13 13:14:49 +00:00
display: inline-flex;
align-items: center;
}
2023-07-19 18:14:04 +00:00
.usercard__details__country__name {
2022-09-13 13:14:49 +00:00
font-size: .9em;
margin-left: 4px;
line-height: 1.2em;
}
.usercard__stats {
display: flex;
justify-content: flex-end;
2023-07-19 18:14:04 +00:00
align-items: center;
pointer-events: none;
flex-grow: 1;
flex-shrink: 0;
gap: 6px;
padding: 0 6px;
2022-09-13 13:14:49 +00:00
}
.usercard__stat {
2023-07-19 18:14:04 +00:00
padding: 4px 8px;
min-width: 80px;
2022-09-13 13:14:49 +00:00
color: inherit;
text-decoration: none;
cursor: default;
text-align: right;
2023-07-19 18:14:04 +00:00
background-color: var(--background-colour-translucent-8);
backdrop-filter: blur(10px);
border: 1px solid var(--background-colour-translucent-6);
border-radius: 5px;
pointer-events: initial;
display: flex;
flex-direction: column-reverse;
}
.usercard__stat--wide {
min-width: 140px;
2022-09-13 13:14:49 +00:00
}
.usercard__stat[href] {
cursor: pointer;
2023-07-19 18:14:04 +00:00
transition: border-color .2s;
2022-09-13 13:14:49 +00:00
}
.usercard__stat[href]:hover,
.usercard__stat[href]:focus {
2023-07-19 18:14:04 +00:00
border-color: var(--accent-colour);
2022-09-13 13:14:49 +00:00
}
.usercard__stat__name {
2023-07-19 18:14:04 +00:00
display: block;
2022-09-13 13:14:49 +00:00
font-size: .9em;
2023-07-19 18:14:04 +00:00
line-height: 1.5em;
2022-09-13 13:14:49 +00:00
font-variant: small-caps;
cursor: inherit;
}
.usercard__stat__value {
display: block;
2023-07-19 18:14:04 +00:00
font-size: 1.2em;
line-height: 1.5em;
cursor: inherit;
2022-09-13 13:14:49 +00:00
}
@media (max-width: 800px) {
2023-07-19 18:14:04 +00:00
.usercard {
flex-wrap: wrap;
}
.usercard__details {
/* i swear to god man */
width: calc(100% - 66px);
}
.usercard__stats {
width: 100%;
justify-content: flex-start;
padding: 0 8px 4px;
}
.usercard__stat,
.usercard__stat--wide {
min-width: auto;
flex-direction: row-reverse;
gap: 5px;
}
.usercard__stat--wide {
flex-direction: row;
}
.usercard__stat__name,
.usercard__stat__value {
display: inline-block;
font-size: .9em;
line-height: 1.2em;
font-variant: initial;
2022-09-13 13:14:49 +00:00
}
}