Closed mganss closed 9 months ago
I think its rather that start
is not a valid value for text-align
. Remember that the spec is living, and especially CSS is moving rapidly.
Back then the text-align
(not text-align-last
) was equivalent to the horizontal alignment (https://github.com/AngleSharp/AngleSharp.Css/blob/devel/src/AngleSharp.Css/Declarations/TextAlignDeclaration.cs#L11C51-L11C79), i.e., https://github.com/AngleSharp/AngleSharp.Css/blob/devel/src/AngleSharp.Css/Constants/Map.cs#L96.
That being written, surely we can support the new values for text-align
.
FWIW this used to work before AngleSharp 0.10:
var html = @"<p style=""text-align: start;"">this is the content of the p tag</p>";
var parser = new HtmlParser(new HtmlParserOptions { IsScripting = false },
BrowsingContext.New(Configuration.Default.WithCss(e =>
{
e.Options = new CssParserOptions
{
IsIncludingUnknownDeclarations = true,
IsIncludingUnknownRules = true,
IsToleratingInvalidSelectors = true,
};
})));
var dom = parser.Parse(html);
var style = dom.Body.FirstElementChild.Style;
var decls = style.Count(); // -> 1
var css = style.ToCss(); // "text-align: start"
Landed in devel
.
Hey @FlorianRappl , thank you for all of the work to support this library! Would it be possible to back port this change to the 0.X
line? I realize it's scheduled for 1.0
but the product I work on is not allowed to use alpha versions of dependencies for compliance reasons. I notice the 1.0
release is has seen a lot of activity lately, but it's not clear to me when it might be available.
Unfortunately no - if that particular patch is relevant for your company then maybe sponsoring AngleSharp / other relevant libraries would be a great start to contributing back.
Do you have an ETA on when version 1.0
might be released?
I wanted to close it out in February, but there are too many projects consuming my time. I'd say not before mid / end of March.
Okay I understand, thank you, I'll check back in then!
I have a feeling this is a configuration issue but I can't figure out what I'm missing here:
This does not occur if the value of
text-align
isleft
for example.