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
Hi, first of all thank you for this project, I've only just started using it but it's a huge help.
I'm trying to load a document which has a stylesheet linked like so:
<link href="style.css" rel="stylesheet">
But calling GetComputedStyle on any element was returning nothing but the default styles. After some debugging I tracked it down the media type check - the medium for this loaded stylesheet was "all" but the IsInverse flag on the medium is true, so it's never valid.
I think the problem might be this line in StyleSheetRequestProcessor.cs where the default for a link with no explicit media type is set to the empty string:
While in MediaList.cs, the type only uses the default of "all" if the value passed in is actually null:
var media = MediaParser.Parse(value ?? CssKeywords.All, ValidatorFactory);
It seems like perhaps this check should be for null or an empty string, or maybe that StyleSheetRequestProcessor should pass in a null when no value is present?
Thanks for your time!
The text was updated successfully, but these errors were encountered:
Hi, first of all thank you for this project, I've only just started using it but it's a huge help.
I'm trying to load a document which has a stylesheet linked like so:
But calling
GetComputedStyle
on any element was returning nothing but the default styles. After some debugging I tracked it down the media type check - the medium for this loaded stylesheet was "all" but theIsInverse
flag on the medium is true, so it's never valid.I think the problem might be this line in
StyleSheetRequestProcessor.cs
where the default for a link with no explicit media type is set to the empty string:While in
MediaList.cs
, the type only uses the default of "all" if the value passed in is actually null:It seems like perhaps this check should be for null or an empty string, or maybe that
StyleSheetRequestProcessor
should pass in anull
when no value is present?Thanks for your time!
The text was updated successfully, but these errors were encountered: