[wp-meta] [Making WordPress.org] #571: Discrepancy in CSS Coding Standards documentation

Making WordPress.org noreply at wordpress.org
Sun Mar 1 21:27:53 UTC 2015


#571: Discrepancy in CSS Coding Standards documentation
-----------------------+-------------------------
  Reporter:  McGuive7  |      Owner:
      Type:  defect    |     Status:  new
  Priority:  normal    |  Component:  Handbooks
Resolution:            |   Keywords:  needs-patch
-----------------------+-------------------------

Comment (by Michael Arestad):

 The inline comment refers to this specific type of comment:

 {{{
 .selector {
   top: 0; /* I'm inline, yo */
 }
 }}}


 However, I don't think there should be an empty newline between a comment
 about a selector and the selector itself though it doesn't mention it
 anywhere and could be open to interpretation. This is how I would do it.

 Correct:
 {{{
 /* This is a comment about this selector */
 .another-selector {
     position: absolute;
     top: 0 !important; /* I should explain why this is so !important */
 }
 }}}

 Incorrect:
 {{{
 /* This is a comment about this selector */

 .another-selector {
     position: absolute;
    /* I should explain why this is so !important */
     top: 0 !important;
 }
 }}}

 I'm not sure any changes should be made to the docs at this time.

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


More information about the wp-meta mailing list