cq-prolyfill.js
function filterRulesByElementAndProp(rules, element, prop) {
	var foundRules = [];
	if (element.id) {
		foundRules = foundRules.concat(rules['#' + element.id] || []);
	}
	(element.getAttribute('class') || '').split(/\s+/).forEach(function(className) {
		foundRules = foundRules.concat(rules['.' + className] || []);
	});
	foundRules = foundRules
		.concat(rules[element.tagName.toLowerCase()] || [])
		.concat(rules['*'] || []);
	return foundRules.filter(function(rule) {
		return rule._rule.style.getPropertyValue(prop)
			&& (
				!rule._rule.parentRule
				|| rule._rule.parentRule.type !== 4 // @media rule
				|| matchesMedia(rule._rule.parentRule.media.mediaText)
			)
			&& elementMatchesSelector(element, rule._selector);
	});
}
function filterRulesByElementAndProp(rules, element, prop) {
	var foundRules = [];
	if (element.id) {
		foundRules = foundRules.concat(rules['#' + element.id] || []);
	}
	(element.getAttribute('class') || '').split(/\s+/).forEach(function(className) {
		foundRules = foundRules.concat(rules['.' + className] || []);
	});
	foundRules = foundRules
		.concat(rules[element.tagName.toLowerCase()] || [])
		.concat(rules['*'] || []);
	return foundRules.filter(function(rule) {
		return rule._rule.style.getPropertyValue(prop)
			&& (
				!rule._rule.parentRule
				|| rule._rule.parentRule.type !== 4 // @media rule
				|| matchesMedia(rule._rule.parentRule.media.mediaText)
			)
			&& elementMatchesSelector(element, rule._selector);
	});
}
function filterRulesByElementAndProp ( rules , element , prop ) { var foundRules = [ ] ; if ( element . id ) { foundRules = foundRules . concat ( rules [ '#' + element . id ] || [ ] ) ; } ( element . getAttribute ( 'class' ) || '' ) . split ( / \s+ / ) . forEach ( function ( className ) { foundRules = foundRules . concat ( rules [ '.' + className ] || [ ] ) ; } ) ; foundRules = foundRules . concat ( rules [ element . tagName . toLowerCase ( ) ] || [ ] ) . concat ( rules [ '*' ] || [ ] ) ; return foundRules . filter ( function ( rule ) { return rule . _rule . style . getPropertyValue ( prop ) && ( ! rule . _rule . parentRule || rule . _rule . parentRule . type !== 4 // @media rule || matchesMedia ( rule . _rule . parentRule . media . mediaText ) ) && elementMatchesSelector ( element , rule . _selector ) ; } ) ; }
Filter rules by matching the element and at least one property

@param  {{<string>: Array.<{_selector: string, _rule: CSSRule}>}} rules
@param  {Element}                                                 element
@param  {string}                                                  prop
@return {Array.<{_selector: string, _rule: CSSRule}>}
Filter rules by matching the element and at least one property