예제 #1
0
파일: CssWriter.cs 프로젝트: carbon/Css
        private void WriteKeyframesRule(Browser browser, KeyframesRule rule, int level)
        {
            browserSupport = new[] { browser };

            writer.Write("@");
            writer.Write(browser.Prefix.Text);
            writer.Write("keyframes ");
            writer.Write(rule.Name);
            writer.Write(" ");

            WriteBlock(rule, level);

            browserSupport = context.BrowserSupport;
        }
예제 #2
0
파일: CssWriter.cs 프로젝트: carbon/Css
        public void WriteKeyframesRule(KeyframesRule rule, int level)
        {
            if (context.BrowserSupport != null)
            {
                // -moz-
                if (context.Compatibility.Firefox > 0 && context.Compatibility.Firefox < 16)
                {
                    WriteKeyframesRule(Browser.Firefox(context.Compatibility.Firefox), rule, level);

                    writer.WriteLine();
                }

                // -webkit- 
                if (context.Compatibility.Safari > 0 && context.Compatibility.Safari < 9)
                {
                    WriteKeyframesRule(Browser.Safari(context.Compatibility.Safari), rule, level);

                    writer.WriteLine();
                }
            }

            writer.Write("@keyframes ");
            writer.Write(rule.Name);
            writer.Write(" ");

            browserSupport = null;

            WriteBlock(rule, level); // super standards

            browserSupport = context.BrowserSupport;
        }