调整选色色轮居中放置。

This commit is contained in:
徐涛 2025-01-06 09:47:03 +08:00
parent fb5aec79d6
commit c30148427b
4 changed files with 7 additions and 4 deletions

View File

@ -14,10 +14,10 @@
clip-path: polygon(23.21% 0%, 50% 100%, 76.79% 0%);
position: absolute;
top: 0;
left: 0;
left: 50%;
width: 15rem;
aspect-ratio: 1 / 1;
transform-origin: center bottom;
transform-origin: 0 bottom;
display: flex;
flex-direction: column;
justify-content: center;

View File

@ -42,7 +42,9 @@ export function ColorColumn({ actived, rotate, rootColor }: ColorWheelProps) {
}, [rootColor]);
return (
<div className={styles.color_column} style={{ transform: `rotate(${rotate}deg)` }}>
<div
className={styles.color_column}
style={{ transform: `rotate(${rotate}deg) translateX(-50%)` }}>
{colorSeries.map((c, index) => (
<ColorBlock
key={`${c}-${index}`}

View File

@ -50,7 +50,7 @@ export function ColorWheel({
return (
<div className={styles.wheel_view}>
<h5>Color Wheel</h5>
<div className={cx('center', styles.wheel_place)}>
<div className={cx(styles.wheel_place)}>
<div className={styles.wheel_container}>
{wheelColors.map(({ color, rotate }) => (
<ColorColumn

View File

@ -9,6 +9,7 @@
flex-direction: row;
align-items: stretch;
gap: var(--spacing-m);
overflow-y: auto;
}
.function_side {
display: flex;