Skip to content

Commit

Permalink
refactor(avatar): more intelligible sprites margin
Browse files Browse the repository at this point in the history
  • Loading branch information
SabreCat committed Aug 22, 2017
1 parent aee80ac commit 24f79d8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion website/client/components/achievements/chooseClass.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
:withBackground='false',
:overrideAvatarGear='classGear(heroClass)',
:hideClassBadge='true',
:margin='"1.8em 1.5em"',
:spritesMargin='"1.8em 1.5em"',
:overrideTopPadding='"0px"',
:class='selectionBox(selectedClass, heroClass)',
)
Expand Down
4 changes: 2 additions & 2 deletions website/client/components/avatar.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template lang="pug">
.avatar(:style="{width, height, paddingTop}", :class="backgroundClass", @click.prevent='castEnd()')
.character-sprites(:style='{margin}')
.character-sprites(:style='{margin: spritesMargin}')
template(v-if="!avatarOnly")
// Mount Body
span(v-if="member.items.currentMount", :class="'Mount_Body_' + member.items.currentMount")
Expand Down Expand Up @@ -122,7 +122,7 @@ export default {
type: Number,
default: 147,
},
margin: {
spritesMargin: {
type: String,
default: '0 auto 0 24px',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
:member="user",
:avatarOnly="true",
:withBackground="true",
:overrideAvatarGear="memberOverrideAvatarGear(item)"
:overrideAvatarGear="memberOverrideAvatarGear(item)",
:spritesMargin='"0px auto auto -1px"',
)

h4.title {{ itemText }}
Expand Down Expand Up @@ -65,11 +66,6 @@
cursor: inherit;
}
.character-sprites {
margin-top: 0px;
margin-left: -1px;
}
.content-text {
font-family: 'Roboto', sans-serif;
font-size: 14px;
Expand Down

0 comments on commit 24f79d8

Please sign in to comment.