Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add partial support for Media Queries Level 4 #1749

Merged
merged 4 commits into from Jul 22, 2022
Merged

Add partial support for Media Queries Level 4 #1749

merged 4 commits into from Jul 22, 2022

Conversation

nex3
Copy link
Contributor

@nex3 nex3 commented Jul 20, 2022

@nex3 nex3 requested a review from Goodwine July 20, 2022 21:16
lib/src/ast/css/media_query.dart Show resolved Hide resolved
lib/src/ast/css/media_query.dart Show resolved Hide resolved
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

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants