Exemplo n.º 1
0
        public async Task CanPrefixWebkitSpecificThings()
        {
            VendorSettings.SetCurrent(new VendorSettings {
                IsWebKit = true
            });
            var style = new Style()
            {
                WebkitFontSmoothing = FontSmoothing.None
            };
            var className = await StyleEngine.StyleToClassName(style);

            Assert.AreEqual(".css-0{-webkit-font-smoothing:none;}", _stylesheet.GetRules());
            VendorSettings.SetCurrent(null);
        }
Exemplo n.º 2
0
        public async Task CanProvideTranslateOperaRules()
        {
            foreach (var rule in this._AUTO_TRANSLATED_RULES)
            {
                var rules = new List <CssValue> {
                    rule, "none"
                };
                VendorSettings.SetCurrent(new VendorSettings {
                    IsOpera = true
                });
                await TransformationsRules.PrefixRules(rules, 0);

                CollectionAssert.That.AreEqualRules(rules, rule, "none", "-o-" + rule, "none");
            }
        }
Exemplo n.º 3
0
 public void TestCleanup()
 {
     VendorSettings.SetCurrent(null);
 }