{ e.stopPropagation(); if (e.key === 'Escape') onClose(); }} oncontextmenu={(e) => e.stopPropagation()} >
Conditional formatting
✕
{#if rules.length === 0}
No rules on this sheet.
{/if} {#each rules as rule, i (rule.id)}
{rule.type === 'iconSet' ? '●' : rule.type === 'colorScale' || rule.type === 'dataBar' ? '' : 'Aa'}
{describeConditionalFormat(rule)}
{formatRuleRanges(rule.ranges)}
sheetState.updateConditionalFormat(rule.id, { stopIfTrue: (e.currentTarget as HTMLInputElement).checked })} /> Stop
sheetState.moveConditionalFormat(rule.id, { by: -1 })}>▲
sheetState.moveConditionalFormat(rule.id, { by: 1 })}>▼
sheetState.deleteConditionalFormat(rule.id)}>✕
{/each}
New rule
Format cells
{#each CONDITIONAL_FORMAT_PRESETS as p (p.kind)}
{p.label}
{/each}
{#if preset.fields.includes('value')}
{/if} {#if preset.fields.includes('value2')}
{/if} {#if preset.fields.includes('text')}
{/if} {#if preset.fields.includes('formula')}
{/if} {#if preset.fields.includes('rank')}
{/if} {#if preset.fields.includes('period')}
{#each CONDITIONAL_FORMAT_TIME_PERIODS as p (p.period)}
{p.label}
{/each}
{/if} {#if preset.fields.includes('iconSet')}
{#each CONDITIONAL_FORMAT_ICON_SETS as set (set)}
{set}
{/each}
{/if} {#if preset.fields.includes('color')}
{/if} {#if preset.usesStyle}
{#each CONDITIONAL_FORMAT_STYLE_PRESETS as s (s.id)}
{s.label}
{/each}
{/if}
Applies to
(appliesTo = selectionText())}>Use selection
Add rule