pass computeColor into shadow control, fix shadow switching types due to invalid shadow color

This commit is contained in:
Henry Jameson 2024-10-12 01:26:29 +03:00
commit 098c6af7ef
7 changed files with 19 additions and 7 deletions

View file

@ -1,6 +1,6 @@
import { unroll } from './iss_utils.js'
export const serializeShadow = s => {
export const serializeShadow = (s, throwOnInvalid) => {
if (typeof s === 'object') {
return `${s.inset ? 'inset ' : ''}${s.x} ${s.y} ${s.blur} ${s.spread} ${s.color} / ${s.alpha}`
} else {