MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / isColorProperty

Function isColorProperty

lib/colorUtils.js:224–251  ·  view source on GitHub ↗

* Test if the given css property name is one that holds color information * * @param {string} prop CSS Property name

(prop)

Source from the content-addressed store, hash-verified

222 * @param {string} prop CSS Property name
223 */
224function isColorProperty(prop) {
225 return (
226 [
227 'color',
228 'background',
229 'backgroundColor',
230 'background-color',
231 'borderColor',
232 'border-color',
233 'borderBottomColor',
234 'border-bottom-color',
235 'borderLeftColor',
236 'border-left-color',
237 'borderRightColor',
238 'borderTopColor',
239 'caretColor',
240 'columnRuleColor',
241 'outlineColor',
242 'textDecorationColor',
243 'border-right-color',
244 'border-top-color',
245 'caret-color',
246 'column-rule-color',
247 'outline-color',
248 'text-decoration-color',
249 ].indexOf(prop) > -1
250 )
251}
252
253export { isColorProperty, convertColorToRGBA, convertColorNameToHex }

Calls

no outgoing calls

Tested by

no test coverage detected