From 55766016d327b4ac7b4e9dff457f1b4589ea753f Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sat, 28 Jan 2023 17:19:24 +0100 Subject: nvm, non-image emojis are a pain --- src/objects/_emoji.scss | 20 +++++++------------- tpl/objects/emoji.pug | 9 +-------- tpl/views/emoji.pug | 10 ++-------- 3 files changed, 10 insertions(+), 29 deletions(-) diff --git a/src/objects/_emoji.scss b/src/objects/_emoji.scss index 6ab71d7..7d03b13 100644 --- a/src/objects/_emoji.scss +++ b/src/objects/_emoji.scss @@ -22,18 +22,13 @@ ), 'colors'); @include iro.bem-object(iro.props-namespace()) { - display: inline-flex; - position: relative; - align-items: center; - justify-content: center; - width: 1em; - height: 1em; - margin: calc(-.5 * fn.dim(--size)) calc(-1 * fn.dim(--pad)); - padding: fn.dim(--pad); - font-size: fn.dim(--size); - line-height: 1; - text-align: center; - vertical-align: middle; + display: inline; + width: 1em; + height: 1em; + margin: calc(-.5 * fn.dim(--size)) calc(-1 * fn.dim(--pad)); + padding: fn.dim(--pad); + font-size: fn.dim(--size); + vertical-align: .15em; @include iro.bem-modifier('125') { margin-top: calc(-.5 * fn.dim(--125 --size)); @@ -46,7 +41,6 @@ border-radius: calc(fn.dim(--rounding) / fn.dim(--zoom)); &:hover { - z-index: 10; transform: scale(fn.dim(--zoom)); background-color: fn.color(--bg); } diff --git a/tpl/objects/emoji.pug b/tpl/objects/emoji.pug index af56c7a..af65028 100644 --- a/tpl/objects/emoji.pug +++ b/tpl/objects/emoji.pug @@ -11,11 +11,4 @@ mixin emoji(id) classes['o-emoji--' + attributes.size] = true; } - if (!attributes.unicode) { - src = id + '.png' - } - - if !attributes.unicode - img(src=src, class=classes) - else - span(class=classes)= id + img(src=id + '.png', class=classes) diff --git a/tpl/views/emoji.pug b/tpl/views/emoji.pug index 2503e8d..8410794 100644 --- a/tpl/views/emoji.pug +++ b/tpl/views/emoji.pug @@ -4,23 +4,17 @@ mixin view-emoji =loremIpsum =' ' +emoji('drgn') - =' ' - +emoji('🐉️')(unicode=true) + +emoji('drgn') =' ' =loremIpsum =' ' +emoji('drgn')(zoomable=true) =' ' - +emoji('🐉️')(zoomable=true unicode=true) - =' ' =loremIpsum =' ' +emoji('drgn')(size=125) - =' ' - +emoji('🐉️')(unicode=true size=125) + +emoji('drgn')(size=125) =' ' =loremIpsum =' ' +emoji('drgn')(zoomable=true size=125) - =' ' - +emoji('🐉️')(zoomable=true unicode=true size=125) -- cgit v1.2.3-70-g09d2