Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance(mfm): $[tada ] のフォントサイズは1段階しか大きくならないように #13757

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### Note
- コントロールパネル内にあるサマリープロキシの設定個所がセキュリティから全般へ変更となります。
- 悪意のある第三者がリモートユーザーになりすましたアクティビティを受け取れてしまう問題を修正しました。詳しくは[GitHub security advisory](https://github.com/misskey-dev/misskey/security/advisories/GHSA-2vxv-pv3m-3wvj)をご覧ください。
- MFM `$[tada ]` をネストしても、文字列は1段階しか大きくならないようになりました

### General
- Enhance: URLプレビューの有効化・無効化を設定できるように #13569
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,11 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
case 'tada': {
const speed = validTime(token.props.args.speed) ?? '1s';
const delay = validTime(token.props.args.delay) ?? '0s';
style = 'font-size: 150%;' + (useAnim ? `animation: global-tada ${speed} linear infinite both; animation-delay: ${delay};` : '');
break;
style = (useAnim ? `animation: global-tada ${speed} linear infinite both; animation-delay: ${delay};` : '');
return h('span', {
style: 'display: inline-block; ' + style,
class: 'mfm-tada',
}, genEl(token.children, scale));
}
case 'jelly': {
const speed = validTime(token.props.args.speed) ?? '1s';
Expand Down
8 changes: 8 additions & 0 deletions packages/frontend/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,14 @@ html[data-color-mode=dark] ._woodenFrame {
}
}

.mfm-tada {
font-size: 150%;
}

.mfm-tada:has(.mfm-tada) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hasセレクタって重そうな気がしたけどどうだろう

Copy link
Contributor Author

@kakkokari-gtyih kakkokari-gtyih May 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

そもそも登場頻度(このクエリに引っかかること)は高くない気がするので大丈夫かも

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ブラウザが「このクエリに引っかかるかどうか」を判定すること自体のコストが高いという話だわね

font-size: 100%;
}

.mfm-x2 {
--mfm-zoom-size: 200%;
}
Expand Down
Loading