MCPcopy
hub / github.com/QwikDev/qwik / setValueForStyle

Function setValueForStyle

packages/qwik/src/core/render/execute-component.ts:204–209  ·  view source on GitHub ↗
(styleName: string, value: any)

Source from the content-addressed store, hash-verified

202};
203
204export const setValueForStyle = (styleName: string, value: any) => {
205 if (typeof value === 'number' && value !== 0 && !isUnitlessNumber(styleName)) {
206 return value + 'px';
207 }
208 return value;
209};
210
211export const getNextIndex = (ctx: RenderContext) => {
212 return intToStr(ctx.$static$.$containerState$.$elementIndex$++);

Callers 2

stringifyStyleFunction · 0.85

Calls 1

isUnitlessNumberFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…