src/Crossjoin/Css/Format/Rule/AtKeyframes/KeyframesRuleSet.php
public function addDeclaration(DeclarationAbstract $declaration)
    {
        // TODO Selectors (or keyframes in this case) do NOT cascade!
        // The last one overwrites previous ones
        // @see: https://developer.mozilla.org/en-US/docs/Web/CSS/@keyframes#When_a_keyframe_is_defined_multiple_times

        if ($declaration instanceof KeyframesDeclaration) {
            $this->declarations[] = $declaration;
        } else {
            throw new \InvalidArgumentException(
                "Invalid declaration instance. Instance of 'KeyframesDeclaration' expected."
            );
        }

        return $this;
    }
public function addDeclaration(DeclarationAbstract $declaration)
    {
        // TODO Selectors (or keyframes in this case) do NOT cascade!
        // The last one overwrites previous ones
        // @see: https://developer.mozilla.org/en-US/docs/Web/CSS/@keyframes#When_a_keyframe_is_defined_multiple_times

        if ($declaration instanceof KeyframesDeclaration) {
            $this->declarations[] = $declaration;
        } else {
            throw new \InvalidArgumentException(
                "Invalid declaration instance. Instance of 'KeyframesDeclaration' expected."
            );
        }

        return $this;
    }
public function addDeclaration ( DeclarationAbstract $ declaration ) { // TODO Selectors (or keyframes in this case) do NOT cascade! // The last one overwrites previous ones // @see: https://developer.mozilla.org/en-US/docs/Web/CSS/@keyframes#When_a_keyframe_is_defined_multiple_times if ( $ declaration instanceof KeyframesDeclaration ) { $ this -> declarations [ ] = $ declaration ; } else { throw new \ InvalidArgumentException ( "Invalid declaration instance. Instance of 'KeyframesDeclaration' expected." ) ; } return $ this ; }
Adds a keyframes declaration.

@param KeyframesDeclaration $declaration
@return $this
Adds a keyframes declaration .