Skip to content

Commit

Permalink
Merge pull request #4 from Hiroshiba/hiho-counter-pr-ab02d289
Browse files Browse the repository at this point in the history
VOICEVOX#2472 の変更提案プルリクエスト
  • Loading branch information
sigprogramming authored Jan 21, 2025
2 parents 43923d6 + 247f059 commit 584791d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 22 deletions.
29 changes: 7 additions & 22 deletions src/components/Sing/CharacterPortrait.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,40 +36,25 @@ const portraitPath = computed(() => {
@use "@/styles/colors" as colors;
// 表示変数
$right-margin: 24px;
$portrait-min-width: 200px;
$portrait-max-width: 40vw;
$portrait-min-height: 500px;
$portrait-max-height: 60vh;
// 画面右下に固定表示
// 幅固定、高さ可変、画像のアスペクト比を保持、heightを調整
.character-portrait-wrap {
display: flex;
justify-content: flex-end;
align-items: flex-end;
position: sticky;
bottom: 0;
right: $right-margin;
height: 100%;
contain: strict;
pointer-events: none;
display: flex;
flex-direction: column;
margin-left: auto;
overflow: hidden;
}
// 通常は下部基準だが、親要素が最小高さより小さい場合は上部基準とし頭を残して足から隠れさせる
.character-portrait {
position: absolute;
// 通常は下部基準
bottom: 0;
// 親要素が最小高さより小さい場合は上部基準
top: max(0px, calc(100% - $portrait-min-height));
min-width: $portrait-min-width;
max-width: $portrait-max-width;
min-height: $portrait-min-height;
max-height: $portrait-max-height;
display: block;
margin-top: auto;
min-height: max(75%, $portrait-min-height);
opacity: 0.55;
backface-visibility: hidden;
object-fit: contain;
transform-origin: top;
}
</style>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 584791d

Please sign in to comment.