fix(frontend): バナー画像の画面上でのクロップが以前の挙動と同一になるように (#16658)

* fix(frontend): バナー画像の画面上でのクロップが以前の挙動と同一になるように

* fix
This commit is contained in:
かっこかり 2025-10-16 18:04:08 +09:00 committed by GitHub
parent a132a1d3e1
commit b6bf3cfcb7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 14 deletions

View File

@ -368,23 +368,19 @@ onDeactivated(disposeBannerParallaxResizeObserver);
> .banner-container { > .banner-container {
position: relative; position: relative;
height: 250px; --bannerHeight: 250px;
height: var(--bannerHeight);
overflow: clip; overflow: clip;
background-size: cover;
background-position: center;
> .banner { > .banner {
position: absolute;
top: 50%;
left: 0;
width: 100%; width: 100%;
height: 300%; height: 100%;
background-size: 100% auto; background-size: cover;
background-color: #4c5e6d; background-color: #4c5e6d;
background-repeat: repeat-y; background-repeat: repeat-y;
background-position: center; background-position-x: center;
will-change: transform; background-position-y: 50%;
transform: translateY(-50%); will-change: background-position-y;
} }
> .fade { > .fade {
@ -677,7 +673,8 @@ onDeactivated(disposeBannerParallaxResizeObserver);
> .main { > .main {
> .profile > .main { > .profile > .main {
> .banner-container { > .banner-container {
height: 140px; --bannerHeight: 140px;
height: var(--bannerHeight);
> .fade { > .fade {
display: none; display: none;
@ -763,10 +760,10 @@ onDeactivated(disposeBannerParallaxResizeObserver);
@keyframes bannerParallaxKeyframes { @keyframes bannerParallaxKeyframes {
from { from {
transform: translateY(-50%); background-position-y: 50%;
} }
to { to {
transform: translateY(-30%); background-position-y: calc(50% + var(--bannerHeight, 250px) / 3);
} }
} }
</style> </style>