Skip to content

Conversation

@mgkuhn
Copy link

@mgkuhn mgkuhn commented Nov 5, 2021

The height and width HTML attributes “must have values that are valid non-negative integers.” Unlike the CSS attributes of the same name, they cannot have a unit suffix such as “px”.

https://html.spec.whatwg.org/multipage/embedded-content-other.html#dimension-attributes

Tool: perl -pi -E 's/(width|height)="(\d+)px;"/$1="$2"/' *.html /.html ...

(Note that this is just a syntax fix. It doesn't yet address the fact that this HTML attribute is actually overridden in the global footer by the CSS class campl-scale-with-grid, which actually sets height: auto. CSS usually overrides HTML presentational attributes.)

The height and width HTML attributes “must have values that are
valid non-negative integers.” Unlike the CSS attributes of the
same name, they cannot have a unit suffix such as “px”.

https://html.spec.whatwg.org/multipage/embedded-content-other.html#dimension-attributes

Tool: perl -pi -E 's/(width|height)="(\d+)px;"/$1="$2"/' *.html */*.html ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant