protected override Value Clone() { ColourUnit result = new ColourUnit(); result.Values = CopyInnerValues(); return(result); }
public override Value ReadStartValue(CssLexer lexer) { // Skip the hash: lexer.Read(); if (lexer.SelectorMode) { // Just a hash (ID selector): return(new TextUnit("#")); } // Read the hex string now: string hex = lexer.ReadString(); ColourUnit result = new ColourUnit(); result.SetHex(hex); return(result); }