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

Unknown properties #29

Open
LeaVerou opened this issue Jul 17, 2020 · 2 comments
Open

Unknown properties #29

LeaVerou opened this issue Jul 17, 2020 · 2 comments
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: Meta

Comments

@LeaVerou
Copy link
Owner

This could include:

  • Most common invalid (nonexistent) properties, at-rules, selectors
  • Common syntax errors
@LeaVerou LeaVerou added proposed stat Proposed statistic to study Section: Meta labels Jul 17, 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 for nonexistent properties:

Properties that are not:

  • known properties, possibly run in a variety of browsers and merge results
  • Prefixed properties. For simplicity, let's just assume everything prefixed with -webkit-, -moz-, -ms-, -apple-, -o- is valid
  • Custom properties (beginning with --)

For syntax errors that we can actually detect via the AST, all I can think of is missing semicolons, where a property value contains propertyName:. Any others?

@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 added a commit that referenced this issue Sep 17, 2020
@LeaVerou
Copy link
Owner Author

I decided to only do nonexistent properties, as the other one with the semicolon would yield too many false positives to be interesting.

@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 LeaVerou changed the title Stats on illegal/invalid syntax Unknown properties Sep 18, 2020
@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 24, 2020
LeaVerou added a commit that referenced this issue Oct 26, 2020
Rel #29
Remove non-ASCII characters and numbers to prevent hacks from showing up as nonexistent properties, normalize to lowercase
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: Meta
Projects
None yet
Development

No branches or pull requests

2 participants