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

Consider adding back djlint (html linter) rule H006 (<img> tags need height and width attributes) #1104

Open
TrialDragon opened this issue Mar 12, 2024 · 1 comment
Labels
A-Build-System A-Meta C-Code Quality S-Needs-Design Needs some thought about how this could be solved

Comments

@TrialDragon
Copy link
Member

I disagree on the disabling of one of those linter rules (H006) since I left it in for a reason (it's considered best practice to define height and width attributes on tags consisting of the size of the image being used, or imo when we're dealing with template then base size desired for layout unless we have a way to get the size of each image. Otherwise the browser would have to reflow and repaint the page which is a minor performance cost to account for variable size which also looks ugly since it causes images to pop in out of nowhere iirc).

TrialDragon (me) on Discord

As far as I know, this info is up to date, but perhaps I'm wrong about all of this. Thoughts on re-adding this rule?

@TrialDragon TrialDragon changed the title Add back djlint (html linter) rule H006 (<img> tags need height and width attributes) Consider adding back djlint (html linter) rule H006 (<img> tags need height and width attributes) Mar 12, 2024
@BD103
Copy link
Member

BD103 commented Mar 12, 2024

For reference, it was first ignored in 128461a. You can find a list of lints here.

@alice-i-cecile alice-i-cecile added A-Build-System S-Needs-Design Needs some thought about how this could be solved labels May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Build-System A-Meta C-Code Quality S-Needs-Design Needs some thought about how this could be solved
Projects
None yet
Development

No branches or pull requests

3 participants