Fossil SCM
IMG tag sizes are wonky because of aggressive CSS
19ac93984344488…
· opened 5 years, 7 months ago
- Type
- Code_Defect
- Priority
- Immediate
- Severity
- Important
- Resolution
- Fixed
- Subsystem
- —
- Created
- Aug. 23, 2020 3:40 a.m.
Reported/identified at:
https://fossil-scm.org/forum/forumpost/fb23801019
The aggressive IMG tag CSS change made at:
https://fossil-scm.org/fossil/info/9e4ca894
img {
max-width: 100%;
height: auto;
}
is breaking client images when they specify a height attribute on their IMG tags: that height is being ignored in favor of the CSS. No amount of attempting to overwrite that style via the browser dev tools (to simulate skin-level changes) has allowed me to override that property, short of outright removing it, e.g. applying this CSS to that specific element has no effect:
max-height: initial;
max-width: initial;
height: initial;
We need to find an alternative formulation for that CSS, or perhaps limit its scope with further selectors, e.g.:
div.forumPostBody img {
max-width: 100%;
height: auto;
}
As it is now, it's breaking perfectly legitimate IMG tags in downstream wikis.
Comments (2)
Reported/identified at:
https://fossil-scm.org/forum/forumpost/fb23801019
The aggressive IMG tag CSS change made at:
https://fossil-scm.org/fossil/info/9e4ca894
img {
max-width: 100%;
height: auto;
}
is breaking client images when they specify a height attribute on their IMG tags: that height is being ignored in favor of the CSS. No amount of attempting to overwrite that style via the browser dev tools (to simulate skin-level changes) has allowed me to override that property, short of outright removing it, e.g. applying this CSS to that specific element has no effect:
max-height: initial;
max-width: initial;
height: initial;
We need to find an alternative formulation for that CSS, or perhaps limit its scope with further selectors, e.g.:
div.forumPostBody img {
max-width: 100%;
height: auto;
}
As it is now, it's breaking perfectly legitimate IMG tags in downstream wikis.
Fixed by check-ins and . See the Forum threads d17986fe1a and fb23801019 for additional information, link to bisects, etc.