public CartoElement(Combinator combinator, Node value) : base(combinator, value) { string strValue = value.ToString().Trim(); if (string.IsNullOrEmpty(strValue)) { m_type = ElementType.Unknown; if (strValue != null) Value = "\"\""; } else if (strValue[0] == '#') { Value = strValue.Remove(0, 1); m_type = ElementType.Id; } else if (strValue[0] == '.') { Value = strValue.Remove(0, 1); m_type = ElementType.Class; } else if (strValue.Contains('*')) { m_type = ElementType.Wildchar; } }
public CartoFilterElement(Node key, Node op, Node value, Combinator combinator, Env env) : base(combinator, value) { m_key = key; m_op = op; m_value = value; m_id = "[" + m_key.ToString() + "]" + m_op.ToString() + m_value.ToCSS(env).ToString(); }
protected override Node CloneCore() { if (NodeValue != null) { return(new Element((Combinator)Combinator.Clone(), NodeValue.Clone())); } return(new Element((Combinator)Combinator.Clone(), Value)); }
public Element(Combinator combinator, Node value) : this(combinator) { TextNode textValue = value as TextNode; if (textValue != null) { Value = textValue.Value.Trim(); } else { NodeValue = value; } }
public Element(Combinator combinator, Node value) : this(combinator) { TextNode textValue = value as TextNode; if (textValue != null && !(value is Quoted)) { Value = textValue.Value.Trim(); } else { NodeValue = value; } }
public Element Element(Combinator combinator, Node value, NodeLocation location) { return new CartoElement(combinator, value) { Location = location }; }
public CartoZoomElement(Node comp, Node number, Combinator combinator, Node value):base(combinator, value) { m_comp = comp; m_value = number; }
public override string ToCSS(Env env) { return(Combinator.ToCSS(env) + Value); }
public Element(Combinator combinator, string value) { Combinator = combinator ?? new Combinator(""); Value = value.Trim(); }
public Element(Combinator combinator, string value) { Combinator = combinator ?? new Combinator(""); Value = value == null ? "" : value.Trim(); }
private Element(Combinator combinator) { Combinator = combinator ?? new Combinator(""); }
public Element(Combinator combinator, string textValue) : this(combinator) { Value = textValue.Trim(); }
public Element(Combinator combinator, Node value) : this(combinator) { if (value is TextNode textValue && !(value is Quoted)) { Value = textValue.Value.Trim(); }
public CartoInvalidElement(Combinator combinator, string text) : base(combinator, "Invalid property or value: '" + text +"'") { }