This repository has been archived by the owner on Sep 16, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 873
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove default inline style of wp-caption
- Loading branch information
1 parent
d23e923
commit 4059738
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4059738
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with this code I still am experiencing a problem with captioned images. When I insert a caption, then I see the image in full width. I fixed it by removing the
style="width: '. $width . 'px
part from line 146. Don't know if it's ok to do it like this, but to me it seems it's working.4059738
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, isn't the point of this commit to remove the inline styles?
4059738
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this breaks the img_unautop filter.
4059738
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep still seeing the inline CSS. I don't know why this is default WP behaviour.
4059738
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed responsive issues by changing
style="width: ' . $width . 'px"
tostyle="max-width: ' . $width . 'px"
.