switch to grid layout

This commit is contained in:
ash lea 2018-07-25 16:51:28 -04:00
parent 165c54fec2
commit 29b6832716
2 changed files with 10 additions and 16 deletions

View File

@ -11,34 +11,28 @@ a {
} }
dl.emojo { dl.emojo {
column-width: 220px; display: grid;
column-gap: 20px; grid-template-columns: repeat(auto-fit, minmax(15em, max-content));
column-rule: 1px solid gray; grid-row-gap: 5px;
} }
dl.emojo div { dl.emojo div {
height: 20px; cursor: pointer;
padding-bottom: 5px;
} }
dl.emojo dt { dl.emojo div * {
width: 28px; display: inline-block;
height: 20px;
display: table-cell;
vertical-align: middle;
} }
dl.emojo dt img { dl.emojo dt img {
height: 20px; height: 20px;
width: 20px; width: 28px;
object-fit: contain; object-fit: contain;
margin: -3px 0 0;
} }
dl.emojo dd { dl.emojo dd {
height: 20px; margin-left: 0;
display: table-cell; padding: 0px 8px;
vertical-align: middle;
} }
dl.emojo dd.success { dl.emojo dd.success {

View File

@ -8,7 +8,7 @@
<dl class="emojo"> <dl class="emojo">
{% for emoj in emojo %} {% for emoj in emojo %}
<div> <div>
<dt><img src="{{ emoj['static_url'] }}" alt=":{{ emoj['shortcode'] }}:"></dt> <dt><img src="{{ emoj.static_url }}" alt=":{{ emoj.shortcode }}:"></dt>
<dd>:{{ emoj.shortcode }}:</dd> <dd>:{{ emoj.shortcode }}:</dd>
</div> </div>
{% endfor %} {% endfor %}