misuzu/assets/less/usercard.less

188 lines
4 KiB
Text
Raw Normal View History

.usercard {
2019-02-28 21:06:30 +00:00
display: flex;
flex-direction: column;
transition: box-shadow .5s;
z-index: 1;
color: #fff;
2019-02-28 21:06:30 +00:00
background-color: var(--background-colour);
box-shadow: 0 1px 2px #000A;
text-shadow: 0 1px 4px #000;
overflow: hidden;
2019-02-28 21:06:30 +00:00
flex: 1 1 auto;
--usercard-header-overlay-start: transparent;
--usercard-header-overlay-stop: var(--background-colour-translucent-9);
&:hover {
2018-10-22 21:05:22 +00:00
box-shadow: 0 1px 4px #000;
z-index: 2;
}
&__background {
position: absolute;
top: 0;
2019-01-03 18:02:38 +00:00
left: 0;
width: 100%;
2019-01-03 18:02:38 +00:00
height: 100%;
2019-02-28 21:06:30 +00:00
background: var(--accent-colour) var(--background-pattern);
background-blend-mode: multiply;
}
&__header {
flex: 0 0 auto;
&__link {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
&__avatar {
width: 60px;
height: 60px;
z-index: 20;
}
&__container {
display: flex;
align-items: center;
padding: 10px;
background-image: linear-gradient(0deg, var(--usercard-header-overlay-stop), var(--usercard-header-overlay-start));
pointer-events: none;
}
&__details {
margin: 0 10px;
flex: 1 1 auto;
@media (max-width: @site-mobile-width) {
text-align: center;
}
}
&__relation {
font-variant: all-small-caps;
background: var(--usercard-header-overlay-stop);
border-radius: 2px;
line-height: 1.2em;
padding: 1px 5px 4px;
cursor: default;
}
&__username {
color: var(--user-colour);
text-shadow: 0 0 5px var(--user-colour);
font-size: 1.5em;
line-height: 1.3em;
}
&__title {
font-size: .9em;
line-height: 1.2em;
}
&__country {
display: inline-flex;
align-items: center;
&__name {
font-size: .9em;
margin-left: 4px;
line-height: 1.2em;
}
}
}
&__container {
2019-02-28 21:06:30 +00:00
flex: 1 1 auto;
background-color: var(--usercard-header-overlay-stop);
display: flex;
flex-direction: column;
2019-02-28 21:06:30 +00:00
justify-content: flex-end;
}
2019-02-28 21:06:30 +00:00
&__dates {
font-size: .9em;
line-height: 1em;
display: flex;
2019-02-28 21:06:30 +00:00
justify-content: space-evenly;
align-items: center;
flex: 0 0 auto;
margin-bottom: 4px;
}
2019-02-28 21:06:30 +00:00
&__date {
padding: 4px;
}
2019-02-28 21:06:30 +00:00
&__stats {
display: flex;
2019-02-28 21:06:30 +00:00
flex-wrap: wrap;
justify-content: flex-end;
flex: 0 0 auto;
}
2019-02-28 21:06:30 +00:00
&__stat {
display: flex;
2019-02-28 21:06:30 +00:00
flex-direction: column-reverse;
color: inherit;
text-decoration: none;
padding: 5px 10px;
cursor: default;
flex: 0 0 auto;
text-align: right;
2019-02-28 21:06:30 +00:00
&__name {
font-size: .9em;
font-variant: small-caps;
cursor: inherit;
}
2019-02-28 21:06:30 +00:00
&__value {
font-size: 1.3em;
cursor: inherit;
display: block;
}
2019-02-28 21:06:30 +00:00
&[href] {
cursor: pointer;
}
2019-02-28 21:06:30 +00:00
&[href]:hover,
&[href]:focus {
border-bottom: 2px solid var(--accent-colour);
padding-bottom: 3px;
}
}
2019-02-28 21:06:30 +00:00
&__actions {
flex: 0 0 auto;
display: flex;
2019-02-28 21:06:30 +00:00
height: 38px;
}
2019-02-28 21:06:30 +00:00
&__action {
flex: 1 1 auto;
display: flex;
justify-content: center;
align-items: center;
color: inherit;
text-decoration: none;
2019-02-28 21:06:30 +00:00
font-size: 1.5em;
transition: background-color .2s;
text-align: center;
cursor: pointer;
2019-02-28 21:06:30 +00:00
&:hover,
&:focus {
background-color: fade(#fff, 20%);
}
2019-02-28 21:06:30 +00:00
&:active {
background-color: fade(#fff, 10%);
}
}
}