[wp-meta] [Making WordPress.org] #6982: Need example about inline CSS Coding Standards

Making WordPress.org noreply at wordpress.org
Wed Nov 8 00:57:52 UTC 2023


#6982: Need example about inline CSS Coding Standards
---------------------------+----------------------
 Reporter:  monzuralam     |       Owner:  (none)
     Type:  enhancement    |      Status:  closed
 Priority:  normal         |   Milestone:
Component:  Developer Hub  |  Resolution:  invalid
 Keywords:                 |
---------------------------+----------------------
Changes (by coffee2code):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 The OP may have meant for "in-line" to mean "on-one-line". So they may
 have been suggesting that the CSS standards should comment on styles being
 defined on the same line as the selector (and either explicitly state the
 former is not recommended, or that maybe both are fine (and under what
 conditions, since the former gets hard to read with more than one style
 rule)).

 I've slightly reformatted their example to clarify this:

 {{{
 /* This formatting is incorrect. */
 .selector-1 { color: green; }

 /* This formatting is correct (selector is not on same line as style rule)
 */
 .selector-1 {
     color: green;
 }
 }}}

 Seems reasonable to me that the CSS coding standards should comment on
 this formatting if it doesn't.

 However, I'm closing this as 'invalid' here since, as jrf pointed out, it
 would be better served being brought up on the coding standards GitHub
 report at https://github.com/WordPress/wpcs-docs.

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/6982#comment:4>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list