#38422 closed defect (bug) (duplicate)
Twenty Seventeen: Coding Style
Reported by: | aaroncampbell | Owned by: | davidakennedy |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.7 |
Component: | Bundled Theme | Keywords: | has-patch |
Focuses: | Cc: |
Description
I'd like to see this kind of variable assignment changed to a standard if.
740 <= $width && $sizes = '(max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px';
We don't use that style anywhere else.
Attachments (1)
Change History (6)
#2
@
8 years ago
- Milestone 4.7 deleted
- Resolution set to duplicate
- Status changed from assigned to closed
Duplicate of #38384.
#3
@
8 years ago
The current formatting is based on what's in Twenty Sixteen. I wonder if there was a reason for this particular structure.
#4
@
8 years ago
It looks like it happened in this commit but has no reference to why the change from the classic if() {}
to the unused test && $var = 'value';
Honestly, it's not as easy to read, it's not as standard, and it doesn't happen anywhere else in core. To me, that's enough to change it.
Note: See
TracTickets for help on using
tickets.
Patch attached, assigning to @davidakennedy to take a look.