mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-14 04:08:32 +03:00
Extra checks for prevent weird font size
This commit is contained in:
parent
d32f4b95a2
commit
2cb22c34e3
2 changed files with 5 additions and 2 deletions
|
@ -317,7 +317,7 @@
|
|||
}
|
||||
.status.large .content {
|
||||
font-size: 150%;
|
||||
font-size: calc(100% + 50% / var(--content-text-weight));
|
||||
font-size: min(calc(100% + 50% / var(--content-text-weight)), 150%);
|
||||
}
|
||||
.status.large .poll,
|
||||
.status.large .actions {
|
||||
|
|
|
@ -229,7 +229,10 @@ function Status({
|
|||
const unauthInteractionErrorMessage = `Sorry, your current logged-in instance can't interact with this status from another instance.`;
|
||||
|
||||
const textWeight = () =>
|
||||
Math.round((spoilerText.length + htmlContentLength(content)) / 140) || 1;
|
||||
Math.max(
|
||||
Math.round((spoilerText.length + htmlContentLength(content)) / 140) || 1,
|
||||
1,
|
||||
);
|
||||
|
||||
const createdDateText = niceDateTime(createdAtDate);
|
||||
const editedDateText = editedAt && niceDateTime(editedAtDate);
|
||||
|
|
Loading…
Add table
Reference in a new issue