MCPcopy Create free account
hub / github.com/dailydotdev/apps / squadRailFadeMask

Function squadRailFadeMask

packages/shared/src/styles/custom.ts:122–134  ·  view source on GitHub ↗
({
  isAtStart,
  isAtEnd,
}: {
  isAtStart: boolean;
  isAtEnd: boolean;
})

Source from the content-addressed store, hash-verified

120// Peeking neighbours of a rail fade toward its edges; an edge with nothing
121// beyond it drops its fade. The width comes from `--squad-rail-fade`.
122export const squadRailFadeMask = ({
123 isAtStart,
124 isAtEnd,
125}: {
126 isAtStart: boolean;
127 isAtEnd: boolean;
128}): string => {
129 const fade = 'var(--squad-rail-fade, 2.5rem)';
130 const start = isAtStart ? '0px' : fade;
131 const end = isAtEnd ? '0px' : fade;
132
133 return `linear-gradient(to right, transparent, black ${start}, black calc(100% - ${end}), transparent)`;
134};

Callers 2

TileRailFunction · 0.90
FeaturedMosaicFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected