code
stringlengths
28
313k
docstring
stringlengths
25
85.3k
func_name
stringlengths
1
74
language
stringclasses
1 value
repo
stringlengths
5
60
path
stringlengths
4
172
url
stringlengths
44
218
license
stringclasses
7 values
getPreparedDataFromComposers = (composers) => { /** Class name of the first composer. */ let baseClassName = '' /** @type {string[]} Combined class names for all composers. */ const baseClassNames = [] /** @type {PrefilledVariants} Combined variant pairings for all composers. */ const combinedPrefilledVariants ...
Returns useful data that can be known before rendering.
getPreparedDataFromComposers
javascript
stitchesjs/stitches
packages/core/src/features/css.js
https://github.com/stitchesjs/stitches/blob/master/packages/core/src/features/css.js
MIT
getTargetVariantsToAdd = ( targetVariants, variantProps, media, isCompoundVariant, ) => { const targetVariantsToAdd = [] targetVariants: for (let [vMatch, vStyle, vEmpty] of targetVariants) { // skip empty variants if (vEmpty) continue /** Position the variant should be inserted into. */ let vOrder = ...
@type {UndefinedVariants} List of variant names that can have an "undefined" pairing.
getTargetVariantsToAdd
javascript
stitchesjs/stitches
packages/core/src/features/css.js
https://github.com/stitchesjs/stitches/blob/master/packages/core/src/features/css.js
MIT
createGlobalCssFunction = ( config, sheet ) => createGlobalCssFunctionMap(config, () => ( ...styles ) => { const render = () => { for (let style of styles) { style = typeof style === 'object' && style || {} let uuid = toHash(style) if (!sheet.rules.global.cache.has(uuid)) { sheet.rules.global.ca...
Returns a function that applies global styles.
createGlobalCssFunction
javascript
stitchesjs/stitches
packages/core/src/features/globalCss.js
https://github.com/stitchesjs/stitches/blob/master/packages/core/src/features/globalCss.js
MIT
createKeyframesFunction = (/** @type {Config} */ config, /** @type {GroupSheet} */ sheet) => ( createKeyframesFunctionMap(config, () => (style) => { /** @type {string} Keyframes Unique Identifier. @see `{CONFIG_PREFIX}-?k-{KEYFRAME_UUID}` */ const name = `${toTailDashed(config.prefix)}k-${toHash(style)}` const ...
Returns a function that applies a keyframes rule.
createKeyframesFunction
javascript
stitchesjs/stitches
packages/core/src/features/keyframes.js
https://github.com/stitchesjs/stitches/blob/master/packages/core/src/features/keyframes.js
MIT
render = () => { if (!sheet.rules.global.cache.has(name)) { sheet.rules.global.cache.add(name) const cssRules = [] toCssRules(style, [], [], config, (cssText) => cssRules.push(cssText)) const cssText = `@keyframes ${name}{${cssRules.join('')}}` sheet.rules.global.apply(cssText) } retur...
@type {string} Keyframes Unique Identifier. @see `{CONFIG_PREFIX}-?k-{KEYFRAME_UUID}`
render
javascript
stitchesjs/stitches
packages/core/src/features/keyframes.js
https://github.com/stitchesjs/stitches/blob/master/packages/core/src/features/keyframes.js
MIT
stringify = ( /** Object representing the current CSS. */ value, /** Replacer function. */ replacer = undefined, ) => { /** Set used to manage the opened and closed state of rules. */ const used = new WeakSet() const parse = (style, selectors, conditions, prevName, prevData) => { let cssText = '' each: for...
Returns a string of CSS from an object of CSS.
stringify
javascript
stitchesjs/stitches
packages/stringify/src/index.js
https://github.com/stitchesjs/stitches/blob/master/packages/stringify/src/index.js
MIT
parse = (style, selectors, conditions, prevName, prevData) => { let cssText = '' each: for (const name in style) { const isAtRuleLike = name.charCodeAt(0) === 64 for (const data of isAtRuleLike && isArray(style[name]) ? style[name] : [style[name]]) { if (replacer && (name !== prevName || data !== prevDa...
Set used to manage the opened and closed state of rules.
parse
javascript
stitchesjs/stitches
packages/stringify/src/index.js
https://github.com/stitchesjs/stitches/blob/master/packages/stringify/src/index.js
MIT