You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, you can navigate through the CSSOM - but its at the moment rather cumbersome and not very elegant.
If you grabbed already the font face rule fontFace you can:
varsrc=fontFace.GetProperty("src").RawValue;// there can be multiple sources (first list) and each source might have multiple properties (second list)varurl=((srcasICssMultipleValue)[0]asICssMultipleValue)[0]asCssUrlValue;// do something with url.Path, which is in the example above:Assert.AreEqual("https://example.org/some-font.ttf",url.Path);
Having a
@font-face
that might look like this:I am able to successfully parse this to an
ICssFontFaceRule
and access theSource
property:I'm interested in the raw value of the
url()
part:Since I found no way that AngleSharp.Css might help in parsing this, I'm about to fire up some Regex to extract the URL.
Just to be extra sure that I didn't miss this functionality I'm asking this question:
Is there any built-in functionality inside AngleSharp.Css to extract the raw URL of an
url(...) ...
string?The text was updated successfully, but these errors were encountered: