diff --git a/packages/common/src/constants.ts b/packages/common/src/constants.ts index 546fce9db4..40a0cc21be 100644 --- a/packages/common/src/constants.ts +++ b/packages/common/src/constants.ts @@ -539,5 +539,5 @@ export const DOUBLE_TAP_POSITION_THRESHOLD = 35; // glass background for mobile action buttons export const MOBILE_ACTION_BUTTON_BG = { - background: "var(--island-bg-color)", + background: "var(--mobile-action-button-bg)", } as const; diff --git a/packages/excalidraw/components/Actions.scss b/packages/excalidraw/components/Actions.scss index 32db665be0..f97f3c7b6f 100644 --- a/packages/excalidraw/components/Actions.scss +++ b/packages/excalidraw/components/Actions.scss @@ -122,7 +122,7 @@ justify-content: center; transition: all 0.2s ease; - background: var(--island-bg-color); + background: var(--mobile-action-button-bg); svg { width: 1rem; @@ -133,7 +133,7 @@ &.active { background: var( --color-surface-primary-container, - var(--island-bg-color) + var(--mobile-action-button-bg) ); } } @@ -169,7 +169,7 @@ width: var(--mobile-action-button-size); height: var(--mobile-action-button-size); - background-color: var(--island-bg-color); + background: var(--mobile-action-button-bg); &:hover { background-color: transparent; diff --git a/packages/excalidraw/components/ColorPicker/ColorPicker.scss b/packages/excalidraw/components/ColorPicker/ColorPicker.scss index 85b499137e..658a75dad7 100644 --- a/packages/excalidraw/components/ColorPicker/ColorPicker.scss +++ b/packages/excalidraw/components/ColorPicker/ColorPicker.scss @@ -168,6 +168,10 @@ width: var(--mobile-action-button-size); height: var(--mobile-action-button-size); } + + &.mobile-border { + border: 1px solid var(--mobile-color-border); + } } .color-picker__button__hotkey-label { diff --git a/packages/excalidraw/components/ColorPicker/ColorPicker.tsx b/packages/excalidraw/components/ColorPicker/ColorPicker.tsx index 4daf245cf1..fa966db53e 100644 --- a/packages/excalidraw/components/ColorPicker/ColorPicker.tsx +++ b/packages/excalidraw/components/ColorPicker/ColorPicker.tsx @@ -231,7 +231,7 @@ const ColorPickerTrigger = ({ label, color, type, - compactMode = false, + stylesPanelMode, mode = "background", onToggle, editingTextElement, @@ -239,7 +239,7 @@ const ColorPickerTrigger = ({ color: string | null; label: string; type: ColorPickerType; - compactMode?: boolean; + stylesPanelMode?: AppState["stylesPanelMode"]; mode?: "background" | "stroke"; onToggle: () => void; editingTextElement?: boolean; @@ -264,7 +264,9 @@ const ColorPickerTrigger = ({ "is-transparent": !color || color === "transparent", "has-outline": !color || !isColorDark(color, COLOR_OUTLINE_CONTRAST_THRESHOLD), - "compact-sizing": compactMode, + "compact-sizing": + stylesPanelMode === "compact" || stylesPanelMode === "mobile", + "mobile-border": stylesPanelMode === "mobile", })} aria-label={label} style={color ? { "--swatch-color": color } : undefined} @@ -277,20 +279,22 @@ const ColorPickerTrigger = ({ onClick={handleClick} >