LessCss.StyleColor.Div C# (CSharp) Method

Div() protected method

protected Div ( StyleValue right ) : StyleValue
right StyleValue
return StyleValue
		protected override StyleValue Div(StyleValue right)
		{
			if(right is StyleColor)
			{
				var other = right as StyleColor;
				return new StyleColor {Value = Value/other.Value};
			}
			if(right is StyleNumber)
			{
				var other = right as StyleNumber;
				if(!string.IsNullOrEmpty(other.UnitOfMeasure))
				{
					throw new ArgumentException();
				}
				return new StyleColor {Value = (int)(Value/other.Value)};
			}
			throw new ArgumentException();
		}
	}