public static ICssObject ToImage(this CSSValue value) { if (value.Is(Keywords.None)) { return(Color.Transparent); } return(value.ToUri() ?? value.ToLinearGradient() ?? value.ToRadialGradient() as ICssObject); }
static CursorMode Evaluate(CSSValue value) { var ident = value as CSSIdentifierValue; if (ident != null) { CursorMode mode; if (modes.TryGetValue(ident.Value, out mode)) { return(mode); } } var location = value.ToUri(); if (location != null) { return(new CustomCursorMode(location)); } return(null); }
static CursorMode Evaluate(CSSValue value) { var ident = value as CSSIdentifierValue; if (ident != null) { CursorMode mode; if (modes.TryGetValue(ident.Value, out mode)) return mode; } var location = value.ToUri(); if (location != null) return new CustomCursorMode(location); return null; }