Opened 10 years ago
Closed 10 years ago
#28681 closed defect (bug) (fixed)
Removes Margin from Editor Style as it overrides CSS in editor style
Reported by: | RDall | Owned by: | azaozz |
---|---|---|---|
Milestone: | 4.0 | Priority: | normal |
Severity: | normal | Version: | 3.9 |
Component: | TinyMCE | Keywords: | has-patch |
Focuses: | Cc: |
Description
The align center in the editor style wasn't working because their was a line of style in the wp-content.css that was overriding all editor styles.
This should be handled by the editor style and not the TinyMCE style.
Attachments (2)
Change History (17)
#1
@
10 years ago
- Keywords has-patch commit added
- Milestone changed from Awaiting Review to 4.0
Makes sense to me.
This ticket was mentioned in IRC in #wordpress-dev by RDall. View the logs.
10 years ago
#5
@
10 years ago
RDall, could you attache before/after screenshots to this ticket?
Which theme's editor stylesheet didn't work?
#6
@
10 years ago
Hi Obenland It was Twenty Thirteen I was working on when I saw this and I was with Aaron Jorbin at WCSEA contributor day when I saw the issue. He suggested that the style wasn't being applied because it was being overridden by style in the include file.
I will attach screenshots shortly.
#7
@
10 years ago
Screenshots:
Post view of image:
http://cl.ly/image/2m211q3G3l0a
Editor view before:
http://cl.ly/image/2s3S1u1O1A1J
And with the patch applied:
http://cl.ly/image/013l0D1n1x0u
#8
follow-up:
↓ 10
@
10 years ago
- Component changed from TinyMCE to Bundled Theme
- Focuses template removed
- Keywords has-patch commit removed
Okay, that's a Twenty Thirteen bug then, where the editor styles need to be more specific.
A center-aligned caption in _s
and Twenty Fourteen is center aligned.
#9
@
10 years ago
How would you add more weight to the editor style css then? Without using the dreaded !important.
I did find the bug… but Jobin suggested the patch… So I am somewhat at a loss of how to override something core doesn't want to override in a theme…
Suggestions welcome :-)
#10
in reply to:
↑ 8
;
follow-up:
↓ 12
@
10 years ago
Replying to obenland:
Okay, that's a Twenty Thirteen bug then, where the editor styles need to be more specific.
A center-aligned caption in_s
and Twenty Fourteen is center aligned.
We had to fix it for Twenty Fourteen in [28941]. Twenty Thirteen doesn't have that style and uses the default one.
I think the point of this ticket is that center-aligned images with captions should be displayed correctly in TinyMCE regardless of the theme. Currently, .html5-captions .wp-caption { margin: 0; }
in default styles overrides .aligncenter { margin-left: auto; margin-right: auto; }
.
#11
@
10 years ago
After looking at the code and trying a few ideas which didn't work as they were still overridden but the tinyMCE file I can whole heartily agree with Serge in comment and Jorbin in his original idea as it should be applied to all themes regardless.
#12
in reply to:
↑ 10
@
10 years ago
- Component changed from Bundled Theme to TinyMCE
- Keywords has-patch added
Replying to SergeyBiryukov:
We had to fix it for Twenty Fourteen in [28941]. Twenty Thirteen doesn't have that style and uses the default one.
I think the point of this ticket is that center-aligned images with captions should be displayed correctly in TinyMCE regardless of the theme. Currently,
.html5-captions .wp-caption { margin: 0; }
in default styles overrides.aligncenter { margin-left: auto; margin-right: auto; }
.
Bummer we didn't catch that in 3.9 :(
But let's make the selector more specific then, rather than removing the style resets.
emoves Margin and Padding from TinyMCE style editor