Skip to content

Commit 9dcaff4

Browse files
committed
Added xxx-large keyword #77
1 parent d94f8f8 commit 9dcaff4

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

src/AngleSharp.Css.Tests/Declarations/CssFontProperty.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,18 @@ public void CssFontSizeAbsoluteImportantXxSmallLegal()
217217
Assert.AreEqual("xx-small", property.Value);
218218
}
219219

220+
[Test]
221+
public void CssFontSizeAbsoluteImportantXxxLargeLegal()
222+
{
223+
var snippet = "font-size : xxx-large !important";
224+
var property = ParseDeclaration(snippet);
225+
Assert.AreEqual("font-size", property.Name);
226+
Assert.IsTrue(property.IsImportant);
227+
Assert.IsFalse(property.IsInherited);
228+
Assert.IsTrue(property.HasValue);
229+
Assert.AreEqual("xxx-large", property.Value);
230+
}
231+
220232
[Test]
221233
public void CssFontSizeAbsoluteMediumUppercaseLegal()
222234
{

src/AngleSharp.Css/Constants/CssKeywords.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,6 +1177,11 @@ public static class CssKeywords
11771177
/// </summary>
11781178
public static readonly String XxLarge = "xx-large";
11791179

1180+
/// <summary>
1181+
/// The xxx-large keyword.
1182+
/// </summary>
1183+
public static readonly String XxxLarge = "xxx-large";
1184+
11801185
/// <summary>
11811186
/// The larger keyword.
11821187
/// </summary>

src/AngleSharp.Css/Constants/Map.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ static class Map
259259
{ CssKeywords.Large, new Length(1.2, Length.Unit.Em) },
260260
{ CssKeywords.XLarge, new Length(1.5, Length.Unit.Em) },
261261
{ CssKeywords.XxLarge, new Length(2.0, Length.Unit.Em) },
262+
{ CssKeywords.XxxLarge, new Length(3.0, Length.Unit.Em) },
262263
{ CssKeywords.Larger, new Length(120.0, Length.Unit.Percent) },
263264
{ CssKeywords.Smaller, new Length(80.0, Length.Unit.Percent) },
264265
};

0 commit comments

Comments
 (0)