MCPcopy
hub / github.com/mountain-loop/yaak / buttonBorderColorVariables

Function buttonBorderColorVariables

packages/theme/src/window.ts:168–189  ·  view source on GitHub ↗
(
  color: YaakColor | null,
  isDefault = false,
)

Source from the content-addressed store, hash-verified

166}
167
168function buttonBorderColorVariables(
169 color: YaakColor | null,
170 isDefault = false,
171): Partial<CSSVariables> {
172 if (color == null) return {};
173
174 const vars: Partial<CSSVariables> = {
175 text: color.lift(0.8).css(),
176 textSubtle: color.lift(0.55).css(),
177 textSubtlest: color.lift(0.4).translucify(0.6).css(),
178 surfaceHighlight: color.translucify(0.8).css(),
179 borderSubtle: color.translucify(0.5).css(),
180 border: color.translucify(0.3).css(),
181 };
182
183 if (isDefault) {
184 vars.borderSubtle = color.lift(0.28).css();
185 vars.border = color.lift(0.5).css();
186 }
187
188 return vars;
189}
190
191function variablesToCSS(
192 selector: string | null,

Callers 2

buttonCSSFunction · 0.85
getThemeCSSFunction · 0.85

Calls 3

cssMethod · 0.80
liftMethod · 0.80
translucifyMethod · 0.80

Tested by

no test coverage detected