fix mobile post button being too square

This commit is contained in:
Henry Jameson 2022-03-22 16:39:27 +02:00
parent c6a4a0a320
commit edb66ecade
1 changed files with 28 additions and 27 deletions

View File

@ -1,13 +1,12 @@
<template> <template>
<div v-if="isLoggedIn"> <button
<button v-if="isLoggedIn"
class="button-default new-status-button" class="MobilePostButton button-default new-status-button"
:class="{ 'hidden': isHidden, 'always-show': isPersistent }" :class="{ 'hidden': isHidden, 'always-show': isPersistent }"
@click="openPostForm" @click="openPostForm"
> >
<FAIcon icon="pen" /> <FAIcon icon="pen" />
</button> </button>
</div>
</template> </template>
<script src="./mobile_post_status_button.js"></script> <script src="./mobile_post_status_button.js"></script>
@ -15,25 +14,27 @@
<style lang="scss"> <style lang="scss">
@import '../../_variables.scss'; @import '../../_variables.scss';
.new-status-button { .MobilePostButton {
width: 5em; &.button-default {
height: 5em; width: 5em;
border-radius: 100%; height: 5em;
position: fixed; border-radius: 100%;
bottom: 1.5em; position: fixed;
right: 1.5em; bottom: 1.5em;
// TODO: this needs its own color, it has to stand out enough and link color right: 1.5em;
// is not very optimal for this particular use. // TODO: this needs its own color, it has to stand out enough and link color
background-color: $fallback--fg; // is not very optimal for this particular use.
background-color: var(--btn, $fallback--fg); background-color: $fallback--fg;
display: flex; background-color: var(--btn, $fallback--fg);
justify-content: center; display: flex;
align-items: center; justify-content: center;
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3), 0px 4px 6px rgba(0, 0, 0, 0.3); align-items: center;
z-index: 10; box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3), 0px 4px 6px rgba(0, 0, 0, 0.3);
z-index: 10;
transition: 0.35s transform; transition: 0.35s transform;
transition-timing-function: cubic-bezier(0, 1, 0.5, 1); transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
}
&.hidden { &.hidden {
transform: translateY(150%); transform: translateY(150%);