Skip to content

Commit 0e63e8c

Browse files
committed
Add Original property in IProperty.
1 parent 5ceb147 commit 0e63e8c

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

src/ExCSS/StyleProperties/IProperty.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ public interface IProperty : IStylesheetNode
44
{
55
string Name { get; }
66
string Value { get; }
7+
string Original { get; }
78
bool IsImportant { get; }
89
}
910
}

src/ExCSS/StyleProperties/Property.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ internal bool TrySetValue(TokenValue newTokenValue)
3131

3232
public string Value => DeclaredValue != null ? DeclaredValue.CssText : Keywords.Initial;
3333

34+
public string Original => DeclaredValue != null ? DeclaredValue.Original.Text : Keywords.Initial;
35+
3436
public bool IsInherited => (_flags & PropertyFlags.Inherited) == PropertyFlags.Inherited && IsInitial ||
3537
DeclaredValue != null && DeclaredValue.CssText.Is(Keywords.Inherit);
3638

0 commit comments

Comments
 (0)