MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / buildGuideStyle

Function buildGuideStyle

src/cm/indentGuides.ts:101–119  ·  view source on GitHub ↗
(levels: number, guideStepPx: number)

Source from the content-addressed store, hash-verified

99}
100
101function buildGuideStyle(levels: number, guideStepPx: number): string {
102 const images = [];
103 const positions = [];
104 const sizes = [];
105
106 for (let i = 0; i < levels; i++) {
107 const color = "var(--indent-guide-color)";
108 images.push(`linear-gradient(${color}, ${color})`);
109 positions.push(`${i * guideStepPx}px 0`);
110 sizes.push("1px 100%");
111 }
112
113 return [
114 `background-image:${images.join(",")}`,
115 "background-repeat:no-repeat",
116 `background-position:${positions.join(",")}`,
117 `background-size:${sizes.join(",")}`,
118 ].join(";");
119}
120
121function getGuideStyle(
122 levels: number,

Callers 1

getGuideStyleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected