Skip to content

Commit

Permalink
Added xxx-large keyword #77
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianRappl committed Aug 10, 2021
1 parent d94f8f8 commit 9dcaff4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/AngleSharp.Css.Tests/Declarations/CssFontProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,18 @@ public void CssFontSizeAbsoluteImportantXxSmallLegal()
Assert.AreEqual("xx-small", property.Value);
}

[Test]
public void CssFontSizeAbsoluteImportantXxxLargeLegal()
{
var snippet = "font-size : xxx-large !important";
var property = ParseDeclaration(snippet);
Assert.AreEqual("font-size", property.Name);
Assert.IsTrue(property.IsImportant);
Assert.IsFalse(property.IsInherited);
Assert.IsTrue(property.HasValue);
Assert.AreEqual("xxx-large", property.Value);
}

[Test]
public void CssFontSizeAbsoluteMediumUppercaseLegal()
{
Expand Down
5 changes: 5 additions & 0 deletions src/AngleSharp.Css/Constants/CssKeywords.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1177,6 +1177,11 @@ public static class CssKeywords
/// </summary>
public static readonly String XxLarge = "xx-large";

/// <summary>
/// The xxx-large keyword.
/// </summary>
public static readonly String XxxLarge = "xxx-large";

/// <summary>
/// The larger keyword.
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions src/AngleSharp.Css/Constants/Map.cs
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ static class Map
{ CssKeywords.Large, new Length(1.2, Length.Unit.Em) },
{ CssKeywords.XLarge, new Length(1.5, Length.Unit.Em) },
{ CssKeywords.XxLarge, new Length(2.0, Length.Unit.Em) },
{ CssKeywords.XxxLarge, new Length(3.0, Length.Unit.Em) },
{ CssKeywords.Larger, new Length(120.0, Length.Unit.Percent) },
{ CssKeywords.Smaller, new Length(80.0, Length.Unit.Percent) },
};
Expand Down

0 comments on commit 9dcaff4

Please sign in to comment.