-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Use universally correct CSS specificity #12001
Comments
Thanks for filing @istarkov! The situation you describe is fine and isn't flagged by the audit (any explicit width/height whether via attributes or CSS passes). I'm not able to reproduce an audit failure on that codepen either. |
RED TRIANGLE 😱 And even the text above says: Probably without the red triangle there will be no issues. Also running my codepen as standalone page https://cdpn.io/istarkov/debug/RwGXVYp/XBrGRjZKeEOM I want the same grey circle as you ;-) |
Thanks for the clarification URL @istarkov I ran the wrong fullpage link, I can reproduce it now :) |
The repro URL no longer has tailwindcss on it so it's not a valid bug, but https://codepen.io/patrickhulce/pen/RwKdyKw still reproduces. It appears to be that the gatherer is not correctly applying CSS specificity and determining the height is |
This has been fixed, but we still aren't perfect with how we measure CSS specificity. Possible approaches discussed:
|
|
Modern time we have css grids,
and grids allows to create same aspect ratio cells using different methods and without wrapping image with aspect ratio div.
i.e. https://codepen.io/istarkov/pen/RwGXVYp
See codepen images has ratio I set in
#aspect-ratio-setter
Solution above allows to create carousels, image boards, etc with 2x less (or even 3x if we calc pseudo) elements.
And above is not the only solution with grids I know and sometimes use others.
Can we not show this diagnostic warning if
Cumulative Layout Shift
is equal to zero?PS: I cant set width and height attrs on image element as we use responsive aspect ratio.
The text was updated successfully, but these errors were encountered: