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

Most common properties used inside media queries #45

Open
LeaVerou opened this issue Jul 24, 2020 · 3 comments
Open

Most common properties used inside media queries #45

LeaVerou opened this issue Jul 24, 2020 · 3 comments
Assignees
Labels
✅ Has algorithm (1/3) An implementable algorithm for how to measure this stat has been described in the issue ✅ Has JS (2/3) JS has been written to calculate this stat ✅ Has SQL (3/3) BigQuery SQL has been written to calculate this stat. proposed stat Proposed statistic to study Section: RWD

Comments

@LeaVerou
Copy link
Owner

We may possibly want to group by type of media query (size-related vs capability-related).

This will give us a lot of insight about which design aspects of websites designers want to adapt to different conditions.

@LeaVerou LeaVerou added proposed stat Proposed statistic to study Section: RWD labels Jul 24, 2020
@LeaVerou LeaVerou added ⚠️ Needs SQL Needs SQL to calculate this stat ⚠️ Needs JS Needs JS to calculate this stat ⚠️ Needs algorithm labels Aug 4, 2020
@LeaVerou
Copy link
Owner Author

Algorithm:

  1. Traverse rules inside rules with type: "media"
  2. Store properties and property count in data structure

Not sure if we should group by type.
a) Because it's not as clear cut. Obviously width, height, aspect-ratio, orientation are size-related, but e.g. what about overflow-*?
b) What happens when a MQ has multiple conditions?

So maybe we should just count properties, which also makes this simpler.

@LeaVerou LeaVerou added ✅ Has algorithm (1/3) An implementable algorithm for how to measure this stat has been described in the issue and removed ⚠️ Needs algorithm labels Aug 22, 2020
@LeaVerou
Copy link
Owner Author

LeaVerou commented Sep 6, 2020

While writing the JS for this I wondered: are we interested in properties inside a MQ on any level, or directly inside MQs? IE if there is an @supports inside a MQ, do we count it?

@LeaVerou LeaVerou self-assigned this Sep 17, 2020
LeaVerou added a commit that referenced this issue Sep 17, 2020
@LeaVerou LeaVerou added ✅ Has JS (2/3) JS has been written to calculate this stat and removed ⚠️ Needs JS Needs JS to calculate this stat labels Sep 17, 2020
@LeaVerou
Copy link
Owner Author

I went with traversing every declaration inside MQs regardless of whether it was also nested in other rules too.

@rviscomi rviscomi added ✅ Has SQL (3/3) BigQuery SQL has been written to calculate this stat. and removed ⚠️ Needs SQL Needs SQL to calculate this stat labels Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✅ Has algorithm (1/3) An implementable algorithm for how to measure this stat has been described in the issue ✅ Has JS (2/3) JS has been written to calculate this stat ✅ Has SQL (3/3) BigQuery SQL has been written to calculate this stat. proposed stat Proposed statistic to study Section: RWD
Projects
None yet
Development

No branches or pull requests

2 participants