MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / formatH

Function formatH

packages/core/css/parser.ts:285–294  ·  view source on GitHub ↗
(align: Parsed<HorizontalAlign>, offset: Parsed<LengthPercentage>)

Source from the content-addressed store, hash-verified

283};
284export function parseBackgroundPosition(text: string, start = 0, keyword = parseKeyword(text, start)): Parsed<BackgroundPosition> {
285 function formatH(align: Parsed<HorizontalAlign>, offset: Parsed<LengthPercentage>) {
286 if (align.value === 'center') {
287 return 'center';
288 }
289 if (offset && offset.value.value !== 0) {
290 return { align: align.value, offset: offset.value };
291 }
292
293 return align.value;
294 }
295 function formatV(align: Parsed<VerticalAlign>, offset: Parsed<LengthPercentage>) {
296 if (align.value === 'center') {
297 return 'center';

Callers 1

parseBackgroundPositionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected