packages/heml-styles/src/plugins/postcss-element-expander/coerceElements.js
function findAtDecl (decls, prop) {
  const foundDecls = decls.filter((decl) => {
    return (isPlainObject(decl) &&
          Object.keys(decl).length > 0 &&
          Object.keys(decl)[0] === `@${prop}`) || decl === `@${prop}`
  })

  if (foundDecls.length === 0) { return }

  const decl = foundDecls[0]

  return isPlainObject(decl) ? Object.values(decl)[0] : true
}
function findAtDecl (decls, prop) {
  const foundDecls = decls.filter((decl) => {
    return (isPlainObject(decl) &&
          Object.keys(decl).length > 0 &&
          Object.keys(decl)[0] === `@${prop}`) || decl === `@${prop}`
  })

  if (foundDecls.length === 0) { return }

  const decl = foundDecls[0]

  return isPlainObject(decl) ? Object.values(decl)[0] : true
}
function findAtDecl ( decls , prop ) { const foundDecls = decls . filter ( ( decl ) => { return ( isPlainObject ( decl ) && Object . keys ( decl ) . length > 0 && Object . keys ( decl ) [ 0 ] === ` ${ prop } ` ) || decl === ` ${ prop } ` } ) if ( foundDecls . length === 0 ) { return } const decl = foundDecls [ 0 ] return isPlainObject ( decl ) ? Object . values ( decl ) [ 0 ] : true }
finds the given at declaration value
@param  {Array[Object]} decls the decls from an element
@param  {String}        the prop
@return {Any}           the found value
finds the given at declaration value