src/Crossjoin/Css/Format/Rule/AtKeyframes/KeyframesRule.php
public function addRule(RuleAbstract $rule)
    {
        // TODO Keyframes with duplicate identifiers do NOT cascade!
        // Last one overwrites previous ones.
        // @see https://developer.mozilla.org/en-US/docs/Web/CSS/@keyframes#Duplicate_resolution

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

        return $this;
    }
public function addRule(RuleAbstract $rule)
    {
        // TODO Keyframes with duplicate identifiers do NOT cascade!
        // Last one overwrites previous ones.
        // @see https://developer.mozilla.org/en-US/docs/Web/CSS/@keyframes#Duplicate_resolution

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

        return $this;
    }
public function addRule ( RuleAbstract $ rule ) { // TODO Keyframes with duplicate identifiers do NOT cascade! // Last one overwrites previous ones. // @see https://developer.mozilla.org/en-US/docs/Web/CSS/@keyframes#Duplicate_resolution if ( $ rule instanceof KeyframesRuleSet ) { $ this -> rules [ ] = $ rule ; } else { throw new \ InvalidArgumentException ( "Invalid rule instance. Instance of 'KeyframesRuleSet' expected." ) ; } return $ this ; }
Adds a keyframes rule set.

@param KeyframesRuleSet $rule
@return $this
Adds a keyframes rule set .