Skip to content

Commit 566d461

Browse files
committed
fix(scene-bar): rename close-shift var to avoid legacy --scene- prefix
The appearance contract audit forbids the --scene-* CSS token family, so --scene-tab-close-shift was rejected in both files. Use the component-scoped name --bitfun-scene-tab-close-shift instead.
1 parent 6df1e5c commit 566d461

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎src/web-ui/src/app/components/SceneBar/SceneBar.scss‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
.bitfun-scene-tab {
5151
// Measured by SceneTab and overridden per-tab; 0 until first measurement.
52-
--scene-tab-close-shift: 0px;
52+
--bitfun-scene-tab-close-shift: 0px;
5353
position: relative;
5454
display: flex;
5555
align-items: center;
@@ -142,10 +142,10 @@
142142
// Counter the whole-tab scale drift for the absolutely-positioned close
143143
// button so press/release stays under the cursor. The drift (distance
144144
// from the tab center × 0.015) is measured by SceneTab and exposed as
145-
// --scene-tab-close-shift. The transform transition below keeps this in
146-
// sync with the tab's 120ms scale.
145+
// --bitfun-scene-tab-close-shift. The transform transition below keeps
146+
// this in sync with the tab's 120ms scale.
147147
.bitfun-scene-tab__close {
148-
transform: translateY(-50%) translateX(var(--scene-tab-close-shift));
148+
transform: translateY(-50%) translateX(var(--bitfun-scene-tab-close-shift));
149149
}
150150
}
151151

‎src/web-ui/src/app/components/SceneBar/SceneTab.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const SceneTab: React.FC<SceneTabProps> = ({
4949
const el = tabRef.current;
5050
if (!el) return;
5151
const updateShift = () => {
52-
el.style.setProperty('--scene-tab-close-shift', `${0.015 * (el.offsetWidth / 2 - 15)}px`);
52+
el.style.setProperty('--bitfun-scene-tab-close-shift', `${0.015 * (el.offsetWidth / 2 - 15)}px`);
5353
};
5454
updateShift();
5555
const observer = new ResizeObserver(updateShift);

0 commit comments

Comments
 (0)