Opened 10 years ago
Closed 10 years ago
#571 closed defect (bug) (invalid)
Discrepancy in CSS Coding Standards documentation
Reported by: | McGuive7 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Handbooks | Keywords: | needs-patch |
Cc: |
Description
There is a slight discrepancy that may warrant correction in the section on CSS inline commenting: http://make.wordpress.org/core/handbook/coding-standards/css/#commenting
The text reads:
“Inline comments should not have empty newlines separating the comment from the item to which it relates.”
However the following code example is formatting WITH a newline break between the comment and the subsequent code block:
/* This is a comment about this selector */ .another-selector { position: absolute; top: 0 !important; /* I should explain why this is so !important */ }
Is this deliberate or not?
Change History (2)
Note: See
TracTickets for help on using
tickets.
The inline comment refers to this specific type of comment:
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:
Incorrect:
I'm not sure any changes should be made to the docs at this time.