Opened 9 days ago
Closed 8 days ago
#42221 closed defect (bug) (fixed)
Code Editors: remove redundant padding in RTL view
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.9 | Priority: | normal |
| Severity: | normal | Version: | trunk |
| Component: | Administration | Keywords: | has-screenshots has-patch |
| Focuses: | ui, rtl | Cc: |
Description
The new theme/plugin file list has a redundant padding in RTL view.
See the attached screenshots.
Attachments (3)
Change History (9)
#2
@afercia
9 days ago
- Component changed from General to Administration
- Focuses ui added; administration removed
- Milestone changed from Awaiting Review to 4.9
#3
@westonruter
8 days ago
The indentation of the element attributes is just for increased readability and maintainability of the PHP code that prints out the HTML. The coding standards have a one-PHP-code-block-per-line sniff. The same was done recently for the Customizer controls. So I don't think necessarily that WordPress doesn't do it, but in contrast I think it often should.
#4
@westonruter
8 days ago
Correction: I realized that this code here isn't outputting attributes via PHP, so they could be on the same line no problem.
@westonruter
8 days ago
#5
@westonruter
8 days ago
- Keywords has-patch added; needs-patch removed
- Owner set to westonruter
- Status changed from new to accepted
Note: See
TracTickets for help on using
tickets.
plugin-editor-php and theme-editor-php set an inline style on the first level list:
<ul role="group" style="padding-left: 0;">
Inline styles with properties involving left/right values are no good for RTL because the build process for RTL processes just the CSS files, not inline styles in the markup. This CSS declaration should be set in a CSS file, properly targeting the first level <ul>. /cc @WraithKenny
On a side note, WordPress doesn't do the following type of indentation in the PHP files:
This is PHP, not JS, and indenting code this way actually produces a lot of white space in the markup.