mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Improve message html element style width value
This commit is contained in:
parent
4fb0199a0f
commit
20cc74b066
1 changed files with 10 additions and 4 deletions
|
|
@ -224,12 +224,16 @@ export const
|
|||
|
||||
// if ('TABLE' === name || 'TD' === name || 'TH' === name) {
|
||||
if (!oStyle.backgroundImage) {
|
||||
value = oStyle.width;
|
||||
if (hasAttribute('width')) {
|
||||
value = getAttribute('width');
|
||||
oStyle.width = value.includes('%') ? value : value + 'px';
|
||||
if (!value) {
|
||||
value = getAttribute('width');
|
||||
if (1 < pInt(value)) {
|
||||
oStyle.width = value.includes('%') ? value : value + 'px';
|
||||
}
|
||||
}
|
||||
delAttribute('width');
|
||||
}
|
||||
value = oStyle.width;
|
||||
if (value && !value.includes('%')) {
|
||||
oStyle.maxWidth = value;
|
||||
if ('TD' !== name && 'TH' !== name) {
|
||||
|
|
@ -238,7 +242,9 @@ export const
|
|||
}
|
||||
if (hasAttribute('height')) {
|
||||
value = getAttribute('height');
|
||||
oStyle.height = value.includes('%') ? value : value + 'px';
|
||||
if (pInt(value)) {
|
||||
oStyle.height = value.includes('%') ? value : value + 'px';
|
||||
}
|
||||
delAttribute('height');
|
||||
}
|
||||
value = oStyle.removeProperty('height');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue