MCPcopy Create free account
hub / github.com/codeaashu/claude-code / applyOverflowStyles

Function applyOverflowStyles

src/ink/styles.ts:434–452  ·  view source on GitHub ↗
(node: LayoutNode, style: Styles)

Source from the content-addressed store, hash-verified

432}
433
434const applyOverflowStyles = (node: LayoutNode, style: Styles): void => {
435 // Yoga's Overflow controls whether children expand the container.
436 // 'hidden' and 'scroll' both prevent expansion; 'scroll' additionally
437 // signals that the renderer should apply scrollTop translation.
438 // overflowX/Y are render-time concerns; for layout we use the union.
439 const y = style.overflowY ?? style.overflow
440 const x = style.overflowX ?? style.overflow
441 if (y === 'scroll' || x === 'scroll') {
442 node.setOverflow(LayoutOverflow.Scroll)
443 } else if (y === 'hidden' || x === 'hidden') {
444 node.setOverflow(LayoutOverflow.Hidden)
445 } else if (
446 'overflow' in style ||
447 'overflowX' in style ||
448 'overflowY' in style
449 ) {
450 node.setOverflow(LayoutOverflow.Visible)
451 }
452}
453
454const applyMarginStyles = (node: LayoutNode, style: Styles): void => {
455 if ('margin' in style) {

Callers 1

stylesFunction · 0.85

Calls 1

setOverflowMethod · 0.45

Tested by

no test coverage detected