Skip to content

Conversation

@nex3
Copy link
Contributor

@nex3 nex3 commented Jul 20, 2022

@nex3 nex3 requested a review from Goodwine July 20, 2022 21:16
Comment on lines +69 to +70
"If conditions is longer than one element, conjunction may not be "
"null.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: would adding single-quotes around conditions and conjunction make it more readable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not the typical style for ArgumentErrors, I think, and hewing to a common style is probably more valuable overall.

type = identifier1;
var identifier2 = identifier();

if (equalsIgnoreCase(identifier2, "and")) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, it took me a while to review because I was confused about this part, I was reading the syntax for <media-query> and I didn't realize it had two lines 😅 (the second showing [ not | only ]? <media-type> [ and <media-condition-without-or> ]?)

I didn't realize one could have and like that but not or :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it has to balance remaining compatible with the legacy syntax even in places where it's confusing with supporting the new syntax.

@nex3 nex3 merged commit eeedebc into main Jul 22, 2022
@nex3 nex3 deleted the media-logic branch July 22, 2022 20:34
nex3 added a commit that referenced this pull request Jul 22, 2022
Also include some code review changes that were meant for #1749
nex3 added a commit that referenced this pull request Jul 22, 2022
Also include some code review changes that were meant for #1749
listEquals(other.conditions, conditions);

int get hashCode => modifier.hashCode ^ type.hashCode ^ listHash(features);
int get hashCode => modifier.hashCode ^ type.hashCode ^ listHash(conditions);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conjunction should be taken into account by equality checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants