Skip to content

Commit 74f2641

Browse files
committed
Added GCPM declarations #7
1 parent 6459901 commit 74f2641

16 files changed

+308
-2
lines changed

doc/Values.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Types of Values
2+
3+
For details see [CSS2 specification](https://www.w3.org/TR/CSS2/cascade.html#value-stages).
4+
5+
* Specified values
6+
* Computed values
7+
* Used values
8+
* Actual values

src/AngleSharp.Css/Constants/CssKeywords.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,5 +1531,15 @@ public static class CssKeywords
15311531
/// The visiblePainted keyword.
15321532
/// </summary>
15331533
public static readonly String VisiblePainted = "visiblePainted";
1534+
1535+
/// <summary>
1536+
/// The open keyword.
1537+
/// </summary>
1538+
public static readonly String Open;
1539+
1540+
/// <summary>
1541+
/// The closed keyword.
1542+
/// </summary>
1543+
public static readonly String Closed;
15341544
}
15351545
}

src/AngleSharp.Css/Constants/InitialValues.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ static class InitialValues
2323
public static readonly ICssValue BackgroundOriginDecl = new Constant<BoxModel>(CssKeywords.BorderBox, BoxModel.PaddingBox);
2424
public static readonly ICssValue BackgroundClipDecl = new Constant<BoxModel>(CssKeywords.BorderBox, BoxModel.BorderBox);
2525
public static readonly ICssValue BackgroundAttachmentDecl = new Constant<BackgroundAttachment>(CssKeywords.Scroll, BackgroundAttachment.Scroll);
26+
public static readonly ICssValue BookmarkStateDecl = new Constant<BookmarkState>(CssKeywords.Open, BookmarkState.Open);
27+
public static readonly ICssValue BookmarkLabelDecl = new Constant<Object>(CssKeywords.None, null);
28+
public static readonly ICssValue BookmarkLevelDecl = new Constant<Int32>(CssKeywords.None, 0);
29+
public static readonly ICssValue FootnotePolicyDecl = new Constant<FootnotePolicy>(CssKeywords.Auto, FootnotePolicy.Auto);
30+
public static readonly ICssValue FootnoteDisplayDecl = new Constant<FootnoteDisplay>(CssKeywords.Block, FootnoteDisplay.Block);
31+
public static readonly ICssValue RunningDecl = new Identifier(CssKeywords.None);
32+
public static readonly ICssValue StringSetDecl = new Constant<Object>(CssKeywords.None, null);
2633
public static readonly ICssValue FontStyleDecl = new Constant<FontStyle>(CssKeywords.Normal, FontStyle.Normal);
2734
public static readonly ICssValue FontVariantDecl = new Constant<FontVariant>(CssKeywords.Normal, FontVariant.Normal);
2835
public static readonly ICssValue FontWeightDecl = new Constant<FontWeight>(CssKeywords.Normal, FontWeight.Normal);

src/AngleSharp.Css/Constants/PropertyNames.cs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,5 +1306,40 @@ public static class PropertyNames
13061306
/// The orientation declaration.
13071307
/// </summary>
13081308
public static readonly String Orientation = "orientation";
1309+
1310+
/// <summary>
1311+
/// The string-set declaration.
1312+
/// </summary>
1313+
public static readonly String StringSet = "string-set";
1314+
1315+
/// <summary>
1316+
/// The running declaration.
1317+
/// </summary>
1318+
public static readonly String Running = "running";
1319+
1320+
/// <summary>
1321+
/// The footnote-display declaration.
1322+
/// </summary>
1323+
public static readonly String FootnoteDisplay = "footnote-display";
1324+
1325+
/// <summary>
1326+
/// The footnote-policy declaration.
1327+
/// </summary>
1328+
public static readonly String FootnotePolicy = "footnote-policy";
1329+
1330+
/// <summary>
1331+
/// The bookmark-level declaration.
1332+
/// </summary>
1333+
public static readonly String BookmarkLevel = "bookmark-level";
1334+
1335+
/// <summary>
1336+
/// The bookmark-label declaration.
1337+
/// </summary>
1338+
public static readonly String BookmarkLabel = "bookmark-label";
1339+
1340+
/// <summary>
1341+
/// The bookmark-state declaration.
1342+
/// </summary>
1343+
public static readonly String BookmarkState = "bookmark-state";
13091344
}
13101345
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
namespace AngleSharp.Css.Declarations
2+
{
3+
using AngleSharp.Css.Dom;
4+
using System;
5+
using static ValueConverters;
6+
7+
static class BookmarkLabelDeclaration
8+
{
9+
public static String Name = PropertyNames.BookmarkLabel;
10+
11+
public static IValueConverter Converter = Any;
12+
13+
public static ICssValue InitialValue = InitialValues.BookmarkLabelDecl;
14+
15+
public static PropertyFlags Flags = PropertyFlags.None;
16+
}
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
namespace AngleSharp.Css.Declarations
2+
{
3+
using AngleSharp.Css.Dom;
4+
using System;
5+
using static ValueConverters;
6+
7+
static class BookmarkLevelDeclaration
8+
{
9+
public static String Name = PropertyNames.BookmarkLevel;
10+
11+
public static IValueConverter Converter = Any;
12+
13+
public static ICssValue InitialValue = InitialValues.BookmarkLevelDecl;
14+
15+
public static PropertyFlags Flags = PropertyFlags.None;
16+
}
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
namespace AngleSharp.Css.Declarations
2+
{
3+
using AngleSharp.Css.Dom;
4+
using System;
5+
using static ValueConverters;
6+
7+
static class BookmarkStateDeclaration
8+
{
9+
public static String Name = PropertyNames.BookmarkState;
10+
11+
public static IValueConverter Converter = Any;
12+
13+
public static ICssValue InitialValue = InitialValues.BookmarkStateDecl;
14+
15+
public static PropertyFlags Flags = PropertyFlags.None;
16+
}
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
namespace AngleSharp.Css.Declarations
2+
{
3+
using AngleSharp.Css.Dom;
4+
using System;
5+
using static ValueConverters;
6+
7+
static class FootnoteDisplayDeclaration
8+
{
9+
public static String Name = PropertyNames.FootnoteDisplay;
10+
11+
public static IValueConverter Converter = Any;
12+
13+
public static ICssValue InitialValue = InitialValues.FootnoteDisplayDecl;
14+
15+
public static PropertyFlags Flags = PropertyFlags.None;
16+
}
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
namespace AngleSharp.Css.Declarations
2+
{
3+
using AngleSharp.Css.Dom;
4+
using System;
5+
using static ValueConverters;
6+
7+
static class FootnotePolicyDeclaration
8+
{
9+
public static String Name = PropertyNames.FootnotePolicy;
10+
11+
public static IValueConverter Converter = Any;
12+
13+
public static ICssValue InitialValue = InitialValues.FootnotePolicyDecl;
14+
15+
public static PropertyFlags Flags = PropertyFlags.None;
16+
}
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
namespace AngleSharp.Css.Declarations
2+
{
3+
using AngleSharp.Css.Dom;
4+
using System;
5+
using static ValueConverters;
6+
7+
static class RunningDeclaration
8+
{
9+
public static String Name = PropertyNames.Running;
10+
11+
public static IValueConverter Converter = Any;
12+
13+
public static ICssValue InitialValue = InitialValues.RunningDecl;
14+
15+
public static PropertyFlags Flags = PropertyFlags.None;
16+
}
17+
}

0 commit comments

Comments
 (0)