Snippet from my current theme.css
file:
.actionBlock[selected] {
color: var(--gray11);
background-color: var(--gray11);
}
I am trying to modify color: var(--gray11);
to
color: #FFF; /* UPDATED : var(--gray11) */
After attempting in PowerShell:
$file = "theme.css"
$content = Get-Content $file -Raw
$content = $content -replace '(\.actionBlock\[selected\]\s*{[^{}]+color:\s*)([^;]+)(;)', ('$1#FFF; /* UPDATED : $2 */')
Set-Content -Path $file -Value $content
This resulted in changing my CSS as follows:
.actionBlock[selected] {
color: var(--gray11);
background-color: #FFF; /* UPDATED : var(--gray11) */
}
This did not meet my expected outcome: I only intended to modify the color
property, not the background-color
.