Skip to content

🎥 Make videos programmatically with React

@remotion/studio: Add WebKit-prefixed user-select styles

Jonny Burger215865150d2d
diff --git a/packages/studio/src/components/CompositionSelectorItem.tsx b/packages/studio/src/components/CompositionSelectorItem.tsx
index 77e60bb5ae..6931a4aa8b 100644
--- a/packages/studio/src/components/CompositionSelectorItem.tsx
+++ b/packages/studio/src/components/CompositionSelectorItem.tsx
@@ -78,6 +78,7 @@ const itemStyle: React.CSSProperties = {
textAlign: 'left',
height: COMPACT_CONTROL_ROW_HEIGHT,
userSelect: 'none',
+ WebkitUserSelect: 'none',
};
const labelStyle: React.CSSProperties = {
diff --git a/packages/studio/src/components/InlineEditableTitle.tsx b/packages/studio/src/components/InlineEditableTitle.tsx
index 8c6a3caad3..2d361e167f 100644
--- a/packages/studio/src/components/InlineEditableTitle.tsx
+++ b/packages/studio/src/components/InlineEditableTitle.tsx
@@ -46,6 +46,7 @@ const titleGridItem: React.CSSProperties = {
overflow: 'hidden',
textOverflow: 'ellipsis',
userSelect: 'none',
+ WebkitUserSelect: 'none',
whiteSpace: 'nowrap',
};
diff --git a/packages/studio/src/components/InspectorPanel/CollapsibleInspectorSectionHeader.tsx b/packages/studio/src/components/InspectorPanel/CollapsibleInspectorSectionHeader.tsx
index 16eebb9a28..e8a8b1c280 100644
--- a/packages/studio/src/components/InspectorPanel/CollapsibleInspectorSectionHeader.tsx
+++ b/packages/studio/src/components/InspectorPanel/CollapsibleInspectorSectionHeader.tsx
@@ -21,6 +21,7 @@ const sectionTitle: React.CSSProperties = {
textAlign: 'left',
textOverflow: 'ellipsis',
userSelect: 'none',
+ WebkitUserSelect: 'none',
whiteSpace: 'nowrap',
};
diff --git a/packages/studio/src/components/InspectorPanel/CompositionMetadata.tsx b/packages/studio/src/components/InspectorPanel/CompositionMetadata.tsx
index 6133bcac74..171f83be77 100644
--- a/packages/studio/src/components/InspectorPanel/CompositionMetadata.tsx
+++ b/packages/studio/src/components/InspectorPanel/CompositionMetadata.tsx
@@ -42,6 +42,7 @@ const computedContainerStyle: React.CSSProperties = {
...inputDraggerContainerStyle,
textAlign: 'right',
userSelect: 'none',
+ WebkitUserSelect: 'none',
};
const computedValueStyle: React.CSSProperties = {
@@ -51,11 +52,13 @@ const computedValueStyle: React.CSSProperties = {
fontStyle: 'italic',
lineHeight: '20px',
userSelect: 'none',
+ WebkitUserSelect: 'none',
};
const metadataFormatterStyle: React.CSSProperties = {
fontSize: 13,
userSelect: 'none',
+ WebkitUserSelect: 'none',
};
const metadataDraggerStyles: Record<
@@ -135,6 +138,7 @@ const metadataLabelText: React.CSSProperties = {
overflow: 'hidden',
textOverflow: 'ellipsis',
userSelect: 'none',
+ WebkitUserSelect: 'none',
whiteSpace: 'nowrap',
};
diff --git a/packages/studio/src/components/InspectorPanel/ElementLibraryButton.tsx b/packages/studio/src/components/InspectorPanel/ElementLibraryButton.tsx
index a1b2309859..8f0c8e4b02 100644
--- a/packages/studio/src/components/InspectorPanel/ElementLibraryButton.tsx
+++ b/packages/studio/src/components/InspectorPanel/ElementLibraryButton.tsx
@@ -48,6 +48,7 @@ const elementLibraryDropdownLabelStyle: React.CSSProperties = {
textAlign: 'left',
textOverflow: 'ellipsis',
userSelect: 'none',
+ WebkitUserSelect: 'none',
whiteSpace: 'nowrap',
};
diff --git a/packages/studio/src/components/InspectorPanel/common.tsx b/packages/studio/src/components/InspectorPanel/common.tsx
index eef130c338..7b917fd16a 100644
--- a/packages/studio/src/components/InspectorPanel/common.tsx
+++ b/packages/studio/src/components/InspectorPanel/common.tsx
@@ -168,6 +168,7 @@ const inlineLabelText: React.CSSProperties = {
overflow: 'hidden',
textOverflow: 'ellipsis',
userSelect: 'none',
+ WebkitUserSelect: 'none',
whiteSpace: 'nowrap',
};
diff --git a/packages/studio/src/components/InspectorPanel/styles.ts b/packages/studio/src/components/InspectorPanel/styles.ts
index 0f10b311a2..bc3d594e2f 100644
--- a/packages/studio/src/components/InspectorPanel/styles.ts
+++ b/packages/studio/src/components/InspectorPanel/styles.ts
@@ -50,6 +50,7 @@ export const sectionHeader: React.CSSProperties = {
lineHeight: '24px',
padding: `4px 0 4px ${INSPECTOR_PANEL_HORIZONTAL_PADDING}px`,
userSelect: 'none',
+ WebkitUserSelect: 'none',
};
export const inspectorSectionBody: React.CSSProperties = {
@@ -170,6 +171,7 @@ export const detailLabel: React.CSSProperties = {
overflow: 'hidden',
textOverflow: 'ellipsis',
userSelect: 'none',
+ WebkitUserSelect: 'none',
whiteSpace: 'nowrap',
};
diff --git a/packages/studio/src/components/InspectorSourceLocation.tsx b/packages/studio/src/components/InspectorSourceLocation.tsx
index 8d02626465..fba034ffac 100644
--- a/packages/studio/src/components/InspectorSourceLocation.tsx
+++ b/packages/studio/src/components/InspectorSourceLocation.tsx
@@ -26,12 +26,14 @@ const sourceLocationStyle: React.CSSProperties = {
textDecoration: 'none',
textOverflow: 'ellipsis',
userSelect: 'none',
+ WebkitUserSelect: 'none',
whiteSpace: 'nowrap',
width: 'fit-content',
};
const quickActionStyle: React.CSSProperties = {
userSelect: 'none',
+ WebkitUserSelect: 'none',
};
const sourceLocationLabelStyle: React.CSSProperties = {
@@ -44,6 +46,7 @@ const sourceLocationLabelStyle: React.CSSProperties = {
overflow: 'hidden',
textOverflow: 'ellipsis',
userSelect: 'none',
+ WebkitUserSelect: 'none',
whiteSpace: 'nowrap',
};
diff --git a/packages/studio/src/components/MenuBuildIndicator.tsx b/packages/studio/src/components/MenuBuildIndicator.tsx
index 09c63744c0..d93f366efe 100644
--- a/packages/studio/src/components/MenuBuildIndicator.tsx
+++ b/packages/studio/src/components/MenuBuildIndicator.tsx
@@ -12,6 +12,7 @@ const cwd: React.CSSProperties = {
alignItems: 'center',
justifyContent: 'center',
userSelect: 'none',
+ WebkitUserSelect: 'none',
whiteSpace: 'nowrap',
};
diff --git a/packages/studio/src/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.tsx b/packages/studio/src/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.tsx
index a8c70520ab..469e754cf0 100644
--- a/packages/studio/src/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.tsx
+++ b/packages/studio/src/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.tsx
@@ -39,6 +39,7 @@ const quickSwitcherTrigger: React.CSSProperties = {
flex: 1,
appearance: 'none',
userSelect: 'none',
+ WebkitUserSelect: 'none',
...hoverableStyle({
idleBackground: WHITE_ALPHA_06,
hoverBackground: WHITE_ALPHA_06,
diff --git a/packages/studio/src/components/QuickSwitcher/QuickSwitcherContent.tsx b/packages/studio/src/components/QuickSwitcher/QuickSwitcherContent.tsx
index 815d8c826a..322f397851 100644
--- a/packages/studio/src/components/QuickSwitcher/QuickSwitcherContent.tsx
+++ b/packages/studio/src/components/QuickSwitcher/QuickSwitcherContent.tsx
@@ -66,6 +66,7 @@ const modeItem: React.CSSProperties = {
fontSize: 13,
cursor: 'pointer',
userSelect: 'none',
+ WebkitUserSelect: 'none',
};
const modeInactive: React.CSSProperties = {
diff --git a/packages/studio/src/components/RadioButton.tsx b/packages/studio/src/components/RadioButton.tsx
index 7e2db95091..1443e39103 100644
--- a/packages/studio/src/components/RadioButton.tsx
+++ b/packages/studio/src/components/RadioButton.tsx
@@ -37,6 +37,7 @@ const row: React.CSSProperties = {
padding: '4px 8px',
textAlign: 'left',
userSelect: 'none',
+ WebkitUserSelect: 'none',
width: 'calc(100% + 16px)',
};
diff --git a/packages/studio/src/components/RenderQueue/VideoMattingQueueItem.tsx b/packages/studio/src/components/RenderQueue/VideoMattingQueueItem.tsx
index 1152b7119f..9004384efd 100644
--- a/packages/studio/src/components/RenderQueue/VideoMattingQueueItem.tsx
+++ b/packages/studio/src/components/RenderQueue/VideoMattingQueueItem.tsx
@@ -111,6 +111,7 @@ export const VideoMattingQueueItem: React.FC<{
selected,
}),
userSelect: 'none' as const,
+ WebkitUserSelect: 'none' as const,
}),
[done, hovered, selected],
);
diff --git a/packages/studio/src/components/RendersTab.tsx b/packages/studio/src/components/RendersTab.tsx
index 0b095a8029..b69bf42e07 100644
--- a/packages/studio/src/components/RendersTab.tsx
+++ b/packages/studio/src/components/RendersTab.tsx
@@ -13,6 +13,7 @@ const row: React.CSSProperties = {
alignItems: 'center',
flex: 1,
userSelect: 'none',
+ WebkitUserSelect: 'none',
};
const badge: React.CSSProperties = {
@@ -24,6 +25,7 @@ const badge: React.CSSProperties = {
justifyContent: 'center',
alignItems: 'center',
userSelect: 'none',
+ WebkitUserSelect: 'none',
};
export const RendersTab: React.FC<{
diff --git a/packages/studio/src/components/Timeline/TimelineEffectItem.tsx b/packages/studio/src/components/Timeline/TimelineEffectItem.tsx
index af2c390cca..c82a0625b3 100644
--- a/packages/studio/src/components/Timeline/TimelineEffectItem.tsx
+++ b/packages/studio/src/components/Timeline/TimelineEffectItem.tsx
@@ -45,6 +45,7 @@ const rowLabel: React.CSSProperties = {
fontSize: 12,
color: WHITE_ALPHA_80,
userSelect: 'none',
+ WebkitUserSelect: 'none',
};
const rowStyle: React.CSSProperties = {
diff --git a/packages/studio/src/components/Timeline/TimelineExpandArrowButton.tsx b/packages/studio/src/components/Timeline/TimelineExpandArrowButton.tsx
index da1e983fdc..64ef5f30ce 100644
--- a/packages/studio/src/components/Timeline/TimelineExpandArrowButton.tsx
+++ b/packages/studio/src/components/Timeline/TimelineExpandArrowButton.tsx
@@ -16,6 +16,7 @@ const arrowButton: React.CSSProperties = {
fontSize: 8,
marginRight: 4,
userSelect: 'none',
+ WebkitUserSelect: 'none',
outline: 'none',
lineHeight: 1,
};
diff --git a/packages/studio/src/components/Timeline/TimelineExpandedRow.tsx b/packages/studio/src/components/Timeline/TimelineExpandedRow.tsx
index f251659ea9..45d10d10b4 100644
--- a/packages/studio/src/components/Timeline/TimelineExpandedRow.tsx
+++ b/packages/studio/src/components/Timeline/TimelineExpandedRow.tsx
@@ -31,6 +31,7 @@ const rowLabel: React.CSSProperties = {
fontSize: 12,
color: WHITE_ALPHA_80,
userSelect: 'none',
+ WebkitUserSelect: 'none',
};
type TimelineExpandedRowProps = {
diff --git a/packages/studio/src/components/Timeline/TimelineFieldLabel.tsx b/packages/studio/src/components/Timeline/TimelineFieldLabel.tsx
index e8664b6582..68bd09081a 100644
--- a/packages/studio/src/components/Timeline/TimelineFieldLabel.tsx
+++ b/packages/studio/src/components/Timeline/TimelineFieldLabel.tsx
@@ -15,6 +15,7 @@ const fieldNameBase: React.CSSProperties = {
lineHeight: `${TIMELINE_STACKED_FIELD_HEADER_HEIGHT}px`,
color: WHITE_ALPHA_80,
userSelect: 'none',
+ WebkitUserSelect: 'none',
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
diff --git a/packages/studio/src/components/Timeline/TimelineKeyframeControls.tsx b/packages/studio/src/components/Timeline/TimelineKeyframeControls.tsx
index 4e10f4723e..4588099b5e 100644
--- a/packages/studio/src/components/Timeline/TimelineKeyframeControls.tsx
+++ b/packages/studio/src/components/Timeline/TimelineKeyframeControls.tsx
@@ -90,6 +90,7 @@ const navButtonStyle: React.CSSProperties = {
outline: 'none',
padding: 0,
userSelect: 'none',
+ WebkitUserSelect: 'none',
width: NAV_BUTTON_SIZE,
};
diff --git a/packages/studio/src/components/Timeline/TimelineSequenceFrame.tsx b/packages/studio/src/components/Timeline/TimelineSequenceFrame.tsx
index 238d53734e..8f25e761f0 100644
--- a/packages/studio/src/components/Timeline/TimelineSequenceFrame.tsx
+++ b/packages/studio/src/components/Timeline/TimelineSequenceFrame.tsx
@@ -13,6 +13,7 @@ const relativeFrameStyle: React.CSSProperties = {
whiteSpace: 'nowrap',
pointerEvents: 'none',
userSelect: 'none',
+ WebkitUserSelect: 'none',
};
const snowflakeStyle: React.CSSProperties = {
diff --git a/packages/studio/src/components/TimelineCombobox.tsx b/packages/studio/src/components/TimelineCombobox.tsx
index 3c7d9cbf74..75cab0a817 100644
--- a/packages/studio/src/components/TimelineCombobox.tsx
+++ b/packages/studio/src/components/TimelineCombobox.tsx
@@ -21,6 +21,7 @@ const label: React.CSSProperties = {
textAlign: 'left',
textOverflow: 'ellipsis',
userSelect: 'none',
+ WebkitUserSelect: 'none',
whiteSpace: 'nowrap',
};