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

Ways CSS is applied to the page #17

Open
LeaVerou opened this issue Jul 10, 2020 · 5 comments
Open

Ways CSS is applied to the page #17

LeaVerou opened this issue Jul 10, 2020 · 5 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: Usage

Comments

@LeaVerou
Copy link
Owner

LeaVerou commented Jul 10, 2020

I'd like to see how CSS is applied to a page: style attribute, <style> element and/or the <link> element. Besides <link>, I'd expect numbers to be quite high on <style> elements mostly due to the critical CSS recommended practice.

(by @catalinred)

Added by @LeaVerou: It would also be interesting to measure how much inline CSS (style attribute) is used on pages.

@LeaVerou LeaVerou added the proposed stat Proposed statistic to study label Jul 10, 2020
@Crissov
Copy link

Crissov commented Jul 21, 2020

This would be even more interesting for SVG.

@LeaVerou
Copy link
Owner Author

LeaVerou commented Jul 21, 2020

@Crissov I believe this is the domain of the Media chapter, you may want to suggest it there!

@LeaVerou LeaVerou added ⚠️ Needs SQL Needs SQL to calculate this stat ⚠️ Needs algorithm ⚠️ Needs JS Needs JS to calculate this stat labels Aug 4, 2020
@LeaVerou
Copy link
Owner Author

LeaVerou commented Aug 5, 2020

So this is measured via the same custom metrics code that runs for #39 though it measures runtime style vs link, which may be different than downloaded if there’s JS that inlines certain stylesheets. Not sure which one we want to measure but I’d be inclined to go with the metric we already have.

@LeaVerou LeaVerou added ✅ Has JS (2/3) JS has been written to calculate this stat ✅ Has algorithm (1/3) An implementable algorithm for how to measure this stat has been described in the issue and removed ⚠️ Needs JS Needs JS to calculate this stat ⚠️ Needs algorithm labels Aug 5, 2020
@rviscomi
Copy link
Collaborator

@LeaVerou what are the stats for this metric: % of pages that use the style attr, % of pages that use the <style> element, etc? And how do you see #39 fitting in?

@LeaVerou
Copy link
Owner Author

@rviscomi #39 is a completely unrelated stat, it was just convenient to measure this in the same code.
I suspect % of pages that use inline vs remote wouldn't be terribly interesting, since most pages use both. We could report average (or median) % of remote vs inline stylesheets. What do you think?

@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 Sep 24, 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: Usage
Projects
None yet
Development

No branches or pull requests

3 participants