MCPcopy
hub / github.com/postcss/autoprefixer / displayType

Method displayType

lib/processor.js:484–500  ·  view source on GitHub ↗

* Is it flebox or grid rule

(decl)

Source from the content-addressed store, hash-verified

482 * Is it flebox or grid rule
483 */
484 displayType(decl) {
485 for (let i of decl.parent.nodes) {
486 if (i.prop !== 'display') {
487 continue
488 }
489
490 if (i.value.includes('flex')) {
491 return 'flex'
492 }
493
494 if (i.value.includes('grid')) {
495 return 'grid'
496 }
497 }
498
499 return false
500 }
501
502 /**
503 * Set grid option via control comment

Callers 1

addMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected