[wp-trac] [WordPress Trac] #29986: Twenty Fifteen: Body margin in Visual Editor
WordPress Trac
noreply at wordpress.org
Tue Oct 21 23:47:00 UTC 2014
#29986: Twenty Fifteen: Body margin in Visual Editor
-------------------------------------+--------------------
Reporter: Jayjdk | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.1
Component: Bundled Theme | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses:
-------------------------------------+--------------------
Comment (by azaozz):
Been thinking/testing how to make this work well. We cannot use @media
rules inside the editor as the iframe width has little to do with the main
window width. It is possible to dynamically add/remove/replace classes on
the iframe body and set the margins and font sizes with them. However that
makes the editor look "strange" at window widths that are close to the
breakpoints for collapsing the menu and moving the right widgets area
under the editor.
As far as I see there are three options:
- Decide on "average" margins and font size. Most compatible, will look
slightly different than the front.
- Dynamically add classes and change margins and font size depending on
the main window width. Will look closer to the front-end in a wider window
but starts to get problematic when the main window is narrower than
1300px.
- Combination of the above, add a class only when the main window hits the
620px breakpoint.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29986#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list