Skip to content

Commit

Permalink
Add Original property in IProperty.
Browse files Browse the repository at this point in the history
  • Loading branch information
H1Gdev committed Dec 28, 2021
1 parent 5ceb147 commit 0e63e8c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ExCSS/StyleProperties/IProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ public interface IProperty : IStylesheetNode
{
string Name { get; }
string Value { get; }
string Original { get; }
bool IsImportant { get; }
}
}
2 changes: 2 additions & 0 deletions src/ExCSS/StyleProperties/Property.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ internal bool TrySetValue(TokenValue newTokenValue)

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

public string Original => DeclaredValue != null ? DeclaredValue.Original.Text : Keywords.Initial;

public bool IsInherited => (_flags & PropertyFlags.Inherited) == PropertyFlags.Inherited && IsInitial ||
DeclaredValue != null && DeclaredValue.CssText.Is(Keywords.Inherit);

Expand Down

0 comments on commit 0e63e8c

Please sign in to comment.