editor_plugin.js adds "hard-coded" inline-style for width+10px which makes it hard for theme development
|Reported by:||sporketeer||Owned by:||azaozz|
|Severity:||normal||Keywords:||inline style, theme problems|
In /wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js in line 122 additional 10 pixels get added to the value entered by a user. This might seem okay if you are using the default theme and some other themes, but it is bad markup making it hard for theme developers to change things around.
Example for a problem:
An image gets uploaded and has a width of 300 pixels. When a caption gets used the following mark-up is being created:
<p><div id="attachment_118" class="wp-caption alignleft" style="width: 310px"><img src="http://www.domain.com/wp-content/uploads/foto-2-300x225.jpg" alt="…
the div has a class and an id so there is no need for inline styles, especially not if it inserts some weird width attribute which someone thought to be appropriate. CSS is great for styling but please leave the styling to the theme's CSS!
So the additional 10 pixels should be taken out, please.
A picture of x pixels in width should be within a div of no size whatsoever, at least not inline styled width.