fix: more CSS tweaks for very small screens (#1527)
This commit is contained in:
parent
59b6c7e0ce
commit
91c491fd8d
|
@ -87,6 +87,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 320px) {
|
@media (max-width: 320px) {
|
||||||
|
.generic-dialog-list {
|
||||||
|
overflow-y: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
}
|
||||||
.generic-dialog-list-button {
|
.generic-dialog-list-button {
|
||||||
padding: 10px 10px;
|
padding: 10px 10px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,6 +61,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 767px) {
|
@media (max-width: 767px) {
|
||||||
|
.account-profile {
|
||||||
|
padding-top: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
.account-profile-grid {
|
.account-profile-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-areas: "avatar name follow"
|
grid-template-areas: "avatar name follow"
|
||||||
|
@ -75,6 +79,31 @@
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 320px) {
|
||||||
|
.account-profile {
|
||||||
|
padding-top: 50px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 240px) {
|
||||||
|
.account-profile {
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
|
.account-profile-grid {
|
||||||
|
grid-template-areas: "avatar name"
|
||||||
|
"avatar label"
|
||||||
|
"username username"
|
||||||
|
"followed-by followed-by"
|
||||||
|
"follow follow"
|
||||||
|
"note note"
|
||||||
|
"meta meta"
|
||||||
|
"details details";
|
||||||
|
grid-template-columns: min-content 1fr;
|
||||||
|
grid-column-gap: 5px;
|
||||||
|
grid-row-gap: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import AccountProfileHeader from './AccountProfileHeader.html'
|
import AccountProfileHeader from './AccountProfileHeader.html'
|
||||||
|
|
|
@ -47,13 +47,13 @@
|
||||||
<style>
|
<style>
|
||||||
.account-profile-details {
|
.account-profile-details {
|
||||||
grid-area: details;
|
grid-area: details;
|
||||||
display: flex;
|
display: grid;
|
||||||
margin: 0 5px;
|
margin: 0 5px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
grid-template-columns: 1fr 1fr 1fr min-content;
|
||||||
}
|
}
|
||||||
|
|
||||||
.account-profile-details-item {
|
.account-profile-details-item {
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
|
@ -106,13 +106,20 @@
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 767px) {
|
|
||||||
.account-profile-details-item {
|
.account-profile-details-item {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 240px) {
|
||||||
|
.account-profile-details {
|
||||||
|
grid-template-columns: 1fr 1fr 1fr;
|
||||||
|
}
|
||||||
|
.account-profile-more-options {
|
||||||
|
justify-self: flex-end;
|
||||||
|
grid-column: 1 / 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import IconButton from '../IconButton.html'
|
import IconButton from '../IconButton.html'
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
<div class="account-profile-follow {shown ? 'shown' : ''}">
|
<div class="account-profile-follow {shown ? 'shown' : ''}">
|
||||||
<IconButton
|
<IconButton
|
||||||
|
className="account-profile-follow-icon-button"
|
||||||
label={followLabel}
|
label={followLabel}
|
||||||
href={followIcon}
|
href={followIcon}
|
||||||
pressable="true"
|
pressable="true"
|
||||||
pressed={following}
|
pressed={following}
|
||||||
big="true"
|
big={!$isVeryTinyMobileSize}
|
||||||
on:click="onFollowButtonClick(event)"
|
on:click="onFollowButtonClick(event)"
|
||||||
ref:icon
|
ref:icon
|
||||||
/>
|
/>
|
||||||
|
@ -18,6 +19,12 @@
|
||||||
.account-profile-follow.shown {
|
.account-profile-follow.shown {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 240px) {
|
||||||
|
.account-profile-follow {
|
||||||
|
justify-self: flex-end;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import IconButton from '../IconButton.html'
|
import IconButton from '../IconButton.html'
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<button class="account-profile-avatar-button"
|
<button class="account-profile-avatar-button"
|
||||||
aria-label="Click to see avatar"
|
aria-label="Click to see avatar"
|
||||||
on:click="onAvatarClick()" >
|
on:click="onAvatarClick()" >
|
||||||
<Avatar {account} size="big" />
|
<Avatar {account} size={avatarSize} />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="account-profile-name">
|
<div class="account-profile-name">
|
||||||
|
@ -138,7 +138,10 @@
|
||||||
: displayName
|
: displayName
|
||||||
},
|
},
|
||||||
bot: ({ account }) => !!account.bot,
|
bot: ({ account }) => !!account.bot,
|
||||||
label: ({ bot }) => bot ? 'bot' : ''
|
label: ({ bot }) => bot ? 'bot' : '',
|
||||||
|
avatarSize: ({ $isVeryTinyMobileSize, $isTinyMobileSize }) => (
|
||||||
|
$isVeryTinyMobileSize ? 'small' : $isTinyMobileSize ? 'medium' : 'big'
|
||||||
|
)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async onAvatarClick () {
|
async onAvatarClick () {
|
||||||
|
|
|
@ -81,6 +81,16 @@
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 240px) {
|
||||||
|
:global(
|
||||||
|
.status-content p:last-child,
|
||||||
|
.status-content blockquote:last-child,
|
||||||
|
.status-content ul:last-child,
|
||||||
|
.status-content ol:last-child) {
|
||||||
|
margin: 0 0 10px; /* looks better on KaiOS with some spacing here */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import { mark, stop } from '../../_utils/marks'
|
import { mark, stop } from '../../_utils/marks'
|
||||||
|
|
Loading…
Reference in New Issue