Skip to content

Commit

Permalink
Remove isArgb.
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianLettner committed Aug 25, 2015
1 parent 5c82dda commit e845865
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/dotless.Core/Parser/Tree/Color.cs
Expand Up @@ -205,7 +205,7 @@ public static Color FromHex(string hex)
rgb = hex.ToCharArray().Select(c => Parse("" + c + c)).ToArray();
}

return new Color(rgb, alpha, text) {isArgb = hex.Length == 8};
return new Color(rgb, alpha, text);
}

private static double[] ParseRgb(string hex)
Expand Down Expand Up @@ -234,8 +234,6 @@ private static double ComputeAlpha(double alpha)
return NumberExtensions.Normalize(alpha, 1.0);
}

private bool isArgb = false;

private readonly int _rgb;
private readonly string _text;

Expand Down Expand Up @@ -335,12 +333,6 @@ public override void AppendCSS(Env env)
return;
}

if (isArgb)
{
env.Output.Append(ToArgb());
return;
}

if (Alpha < 1.0)
{
env.Output.AppendFormat(CultureInfo.InvariantCulture, "rgba({0}, {1}, {2}, {3})", rgb[0], rgb[1], rgb[2], Alpha);
Expand Down

0 comments on commit e845865

Please sign in to comment.