Skip to content

Release 1.0.0 #157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 64 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
2a2f5da
Empty string behaves like null
FlorianRappl Feb 16, 2023
8ecae08
Update ColorParser.cs
jogibear9988 Apr 20, 2023
49b4877
Merge pull request #141 from jogibear9988/patch-1
FlorianRappl Apr 20, 2023
6ab7166
WIP
FlorianRappl Jun 6, 2023
c8321b8
Working on new media list parser
FlorianRappl Jun 10, 2023
3b89d01
Fixed serialization due to broken longhands #129
FlorianRappl Jun 14, 2023
b9aef4c
Fixed appending eof character #123
FlorianRappl Jun 14, 2023
6905fa5
Fixed missing semicolon separator #135
FlorianRappl Jun 14, 2023
1f3d718
Fixed keyframe stop truncation #128
FlorianRappl Jun 14, 2023
12f61a1
Fixed grid and grid-gap ordering #137
FlorianRappl Jun 14, 2023
ad7aff4
Improved CSS minification of grid #89
FlorianRappl Jun 14, 2023
78740fe
Added more tests for background-size
FlorianRappl Jun 14, 2023
6d52e79
Updated media parsing #133
FlorianRappl Jun 15, 2023
10845f2
Added test to verify fix for #133
FlorianRappl Jun 15, 2023
314805d
Added test to validate #140
FlorianRappl Jun 15, 2023
9fe8a86
Added 8-digit hex color #132
FlorianRappl Jun 15, 2023
50d8e9d
WIP #136
FlorianRappl Jun 15, 2023
15cb522
Validate that #126 can be done
FlorianRappl Jun 16, 2023
c9bc34e
Added rgb function syntax L4 #131
FlorianRappl Jun 18, 2023
4ceb46c
Prepare for more color functions
FlorianRappl Jun 18, 2023
649beb7
Added implementation of new color functions #131
FlorianRappl Jun 18, 2023
240cee3
Update Directory.Build.props
FlorianRappl Dec 15, 2023
7a96a55
Added support for recent list-type
FlorianRappl Jan 16, 2024
dba9069
Fixed text align behavior
FlorianRappl Jan 16, 2024
6ab4a63
Improved rule prios
FlorianRappl Jan 16, 2024
0c3aa78
Fix for GetInnerText #155
FlorianRappl Jan 16, 2024
c39af8a
Working on CSS nesting
FlorianRappl Jan 17, 2024
bf4db74
Allow disabling of nesting
FlorianRappl Jan 17, 2024
06b15e3
Updated nested implementation #148
FlorianRappl Jan 17, 2024
e97935a
Added margin and padding decls
FlorianRappl Jan 17, 2024
a5bcabf
Improved render tree
FlorianRappl Jan 17, 2024
baca67a
Improved computation #136
FlorianRappl Jan 17, 2024
1c9efd4
Prepared computation model
FlorianRappl Jan 18, 2024
8295892
Implemented CSS variable resolution #62
FlorianRappl Jan 18, 2024
9abdd1b
Added new metric values
FlorianRappl Jan 18, 2024
ed2b542
Activated disabled test
FlorianRappl Jan 18, 2024
64df5cf
Refactored naming to be consistent
FlorianRappl Jan 18, 2024
e8dab26
Refactored value model names
FlorianRappl Jan 18, 2024
2a44071
Extended model for css integer
FlorianRappl Jan 19, 2024
d856b31
Integrate percentage
FlorianRappl Jan 19, 2024
8205cf8
Added extra API method for computing style
FlorianRappl Jan 19, 2024
caab82a
Added test for new API
FlorianRappl Jan 19, 2024
c51cd43
Use latest version of AngleSharp
FlorianRappl Jan 19, 2024
973d83c
Prepare docs update
FlorianRappl Jan 19, 2024
b755de0
Updated CI/CD
FlorianRappl Jan 19, 2024
adba277
Updated CI/CD
FlorianRappl Feb 25, 2024
0652a66
Re-added dropped character
FlorianRappl Feb 25, 2024
333885b
Fix NullReferenceException in ChangeDeclarations
meziantou Feb 26, 2024
b36924d
review
meziantou Feb 26, 2024
46635ab
Fix nullable reference exception in CssOriginValue
meziantou Feb 26, 2024
c1c83ee
Merge pull request #160 from meziantou/fix-nre
FlorianRappl Feb 26, 2024
e68db8f
Update CssOriginValue.cs
meziantou Feb 26, 2024
102cc32
Merge pull request #162 from meziantou/nre-CssOriginValue
FlorianRappl Feb 26, 2024
dbf8aca
Uniformize CssValue.Equals implementation
meziantou Feb 26, 2024
151244d
Fix NullReferenceException in CssShadowValue
meziantou Feb 26, 2024
1d40f1c
Merge pull request #163 from meziantou/uniformize-cssvalue-comparison
FlorianRappl Feb 26, 2024
ff33ad7
Merge pull request #164 from meziantou/fix-nre-CssShadowValue
FlorianRappl Feb 26, 2024
4c9f16a
Get declarations
SebastianStehle Sep 19, 2024
459b48c
Merge pull request #176 from SebastianStehle/devel
FlorianRappl Sep 20, 2024
67c87c0
Updated license ref
FlorianRappl Jan 26, 2025
465b500
Updated to 2025
FlorianRappl Jan 26, 2025
5617e86
Updated year
FlorianRappl Jan 26, 2025
8889e06
Fix "transform: rotateZ" becoming "transform: rotateY"
NSGolova May 24, 2025
4b4d41e
Merge pull request #185 from NSGolova/devel
FlorianRappl May 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed serialization due to broken longhands #129
  • Loading branch information
FlorianRappl committed Jun 14, 2023
commit 3b89d01339efd4ce8ca8eac47f82e65184da75b5
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 1.0.0

Released on tbd.

- Updated to use AngleSharp 1.0
- Fixed issue when updating shorthands with invalid values (#129)

# 0.17.0

Released on Sunday, January 15 2023.
Expand Down
12 changes: 12 additions & 0 deletions src/AngleSharp.Css.Tests/Library/StringRepresentation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,17 @@ public void EscapePropertyNames_UnknownDeclaration_Issue120()

Assert.AreEqual(css, generatedCss);
}

[Test]
public void BorderWithEmptyPx_Issue129()
{
var html = "<div style=\"border-width:1px;border-right-width:px;\"></div>";
var dom = html.ToHtmlDocument(Configuration.Default.WithCss());
var div = dom.Body?.FirstElementChild;
var style = div.GetStyle();
var css = style.ToCss();

Assert.AreEqual("border-width: 1px", css);
}
}
}
16 changes: 13 additions & 3 deletions src/AngleSharp.Css/Dom/Internal/CssStyleDeclaration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private ICssProperty TryCreateShorthand(String shorthandName, IEnumerable<String
TryCreateShorthand(name, serialized, usedProperties, force) :
longhands.Where(m => m.Name == name).FirstOrDefault();

if (property != null)
if (property?.Value is not null)
{
usedProperties.Add(name);
count = count + 1;
Expand Down Expand Up @@ -318,8 +318,18 @@ internal void UpdateDeclarations(IEnumerable<ICssProperty> decls) =>
private ICssProperty GetPropertyShorthand(String name) =>
TryCreateShorthand(name, Enumerable.Empty<String>(), new List<String>(), true);

private ICssProperty CreateProperty(String propertyName) =>
GetProperty(propertyName) ?? _context.CreateProperty(propertyName);
private ICssProperty CreateProperty(String propertyName)
{
var newProperty = _context.CreateProperty(propertyName);
var existing = GetProperty(propertyName);

if (existing is not null)
{
newProperty.RawValue = existing.RawValue;
}

return newProperty;
}

private void SetProperty(ICssProperty property)
{
Expand Down