Opened on 10/05/2015 at 10:24:44 AM
Closed on 11/10/2015 at 02:32:37 PM
#3158 closed change (fixed)
Add CSS and HTML rules to coding style page
Reported by: | saroyanm | Assignee: | |
---|---|---|---|
Priority: | P3 | Milestone: | |
Module: | Websites | Keywords: | |
Cc: | greiner, fhd, trev | Blocked By: | |
Blocking: | Platform: | Unknown / Cross platform | |
Ready: | yes | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
Description (last modified by greiner)
Background
In coding style page CSS and HTML rules are missing, which leads to redundant dispute during code reviews.
What to change
Add rules below as coding style for HTML and CSS:
- Follow the Google HTML/CSS Style Guide.
- Use double over single quotation marks.
- Don't omit optional HTML tags.
- CSS color values should be specified in hexadecimal where possible.
- CSS shorthand properties usage is optional.
- CSS rule declaration order should follow the WordPress CSS Coding Standards.
- CSS number values should specify units where possible.
- CSS number values between -1 and 1 should specify a leading 0.
Attachments (0)
Change History (8)
comment:3 in reply to: ↑ 2 Changed on 10/06/2015 at 08:57:15 AM by saroyanm
- Description modified (diff)
Replying to fhd:
I think we should change Use hexadecimal values for colors where possible to CSS color values should be specified in hexadecimal where possible for clarity.
Done
comment:4 Changed on 10/06/2015 at 05:04:53 PM by saroyanm
- Description modified (diff)
During one of the review we have noticed that having shorthand property usage as requirement is not a good idea while we can't inherit property with shorthand and probably there could be cases when we need to inherit.
comment:6 Changed on 11/09/2015 at 05:19:44 PM by saroyanm
- Ready set
I think we can already have this rules online, if no objections.
Anyway we can always update the rules IMO.
comment:7 Changed on 11/09/2015 at 05:33:41 PM by saroyanm
- Review URL(s) modified (diff)
- Status changed from new to reviewing
comment:8 Changed on 11/10/2015 at 02:32:37 PM by saroyanm
- Resolution set to fixed
- Status changed from reviewing to closed
I think we should change Use hexadecimal values for colors where possible to CSS color values should be specified in hexadecimal where possible for clarity.