Skip to content

justify-content update breaks the following css (Starting with 4.2.3) #172

@WalterB-MAMC

Description

@WalterB-MAMC

In the code snippet below, it has worked for a few versions back, but once I upgrade to 4.2.3 this code blows up with a null exception error and it says that .Text is null. I could not even check if it was null many different ways. Was Text changed to something else that I should be using to compare or is this a bug? Is there a better way to do this?

I am checking the classes and properties sets to see if they are different, if they are then I modify them and then further down I just extract the class and the properties that are different out to make a smaller file of the differences. This way I can extract all the same code out of a theme CSS file to be only the color differences for the most part and add data-bs tags so I can easily flip between say light and dark themes in Bootstrap format. Like I said this has been working up until 4.2.3. Not sure why it breaks in that version and above.

var css1Rules = stylesheet1.StyleRules;
var css2Rules = stylesheet2.StyleRules;

var bothRules = css1Rules.Zip(css2Rules, (r1, r2) => new { Rule1 = r1, Rule2 = r2 });

foreach (var rule in bothRules)
{
     if (rule.Rule2.Text != rule.Rule1.Text)
     {
        //do checks and stuff
     }

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions