diff options
| Commit | c811cb46631e66772a108c393f6ef53a83ca010b (patch) | |
|---|---|---|
| Author | 2017-09-01 15:34:29 +0800 | |
| Committer | 2017-09-01 15:34:29 +0800 | |
| Files | cc78dfa6f7398e9e77dd81d8865bcca939b9549d /src/_avatars.scss | |
| Spectre-Dark-Gruvbox-0.4.0.tar Spectre-Dark-Gruvbox-0.4.0.tar.gz Spectre-Dark-Gruvbox-0.4.0.zip | ||
| Parent | 66c492fd05c2d720c81e2be8d6845560b868e7ff (diff) | |
| Parent | cca094ecbf55e8a4f552e55219b37373d3c07d9e (diff) | |
Merge pull request #266 from picturepan2/0.4.0 v0.4.0
0.4.0
1 files changed, 77 insertions, 0 deletions
| -rw-r--r-- | src/_avatars.scss | 77 |
diff --git a/src/_avatars.scss b/src/_avatars.scss new file mode 100644 index 0000000..53bda1d --- /dev/null +++ b/src/_avatars.scss @@ -0,0 +1,77 @@ +// Avatars +.avatar { + @include avatar-base(); + background: $primary-color; + border-radius: 50%; + color: rgba($light-color, .85); + display: inline-block; + font-weight: 300; + line-height: 1; + margin: 0; + position: relative; + vertical-align: middle; + + &.avatar-xs { + @include avatar-base($unit-4); + } + &.avatar-sm { + @include avatar-base($unit-6); + } + &.avatar-lg { + @include avatar-base($unit-12); + } + &.avatar-xl { + @include avatar-base($unit-16); + } + + img { + border-radius: 50%; + height: 100%; + position: relative; + width: 100%; + z-index: $zindex-0; + } + + .avatar-icon, + .avatar-presence { + background: $bg-color-light; + bottom: 14.64%; + height: 50%; + padding: $border-width-lg; + position: absolute; + right: 14.64%; + transform: translate(50%, 50%); + width: 50%; + z-index: $zindex-0 + 1; + } + + .avatar-presence { + background: $gray-color; + box-shadow: 0 0 0 $border-width-lg $light-color; + border-radius: 50%; + height: .5em; + width: .5em; + + &.online { + background: $success-color; + } + + &.busy { + background: $error-color; + } + + &.away { + background: $warning-color; + } + } + + &[data-initial]::before { + color: currentColor; + content: attr(data-initial); + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%, -50%); + z-index: $zindex-0; + } +} |