protected mediaParent ( Leafo\ScssPhp\Formatter\OutputBlock $scope ) : Leafo\ScssPhp\Formatter\OutputBlock | ||
$scope | Leafo\ScssPhp\Formatter\OutputBlock | |
return | Leafo\ScssPhp\Formatter\OutputBlock |
protected function mediaParent(OutputBlock $scope)
{
while (!empty($scope->parent)) {
if (!empty($scope->type) && $scope->type !== Type::T_MEDIA) {
break;
}
$scope = $scope->parent;
}
return $scope;
}