MCPcopy
hub / github.com/tailwindlabs/tailwindcss / resolve

Method resolve

packages/tailwindcss/src/theme.ts:219–235  ·  view source on GitHub ↗
(
    candidateValue: string | null,
    themeKeys: ThemeKey[],
    options: ThemeOptions = ThemeOptions.NONE,
  )

Source from the content-addressed store, hash-verified

217 }
218
219 resolve(
220 candidateValue: string | null,
221 themeKeys: ThemeKey[],
222 options: ThemeOptions = ThemeOptions.NONE,
223 ): string | null {
224 let themeKey = this.#resolveKey(candidateValue, themeKeys)
225
226 if (!themeKey) return null
227
228 let value = this.values.get(themeKey)!
229
230 if ((options | value.options) & ThemeOptions.INLINE) {
231 return value.value
232 }
233
234 return this.#var(themeKey)
235 }
236
237 resolveValue(candidateValue: string | null, themeKeys: ThemeKey[]): string | null {
238 let themeKey = this.#resolveKey(candidateValue, themeKeys)

Callers 15

index.tsFile · 0.80
resolveCssIdFunction · 0.80
resolveJsIdFunction · 0.80
runResolverFunction · 0.80
traceDependenciesFunction · 0.80
index.tsFile · 0.80
createServerFunction · 0.80
renderer.test.tsFile · 0.80
readCandidateGroupsFunction · 0.80
loadDesignSystemFunction · 0.80

Calls 3

#resolveKeyMethod · 0.95
#varMethod · 0.95
getMethod · 0.45

Tested by 4

createServerFunction · 0.64
loadStylesheetFunction · 0.64
runFunction · 0.64
loadStylesheetFunction · 0.64