Page MenuHomePhabricator

Write CSS Linter
Open, NormalPublic

Description

See D3955. We should develop a CSS style guide and enforce it with lint, similar to the JS and PHP guides.

Proposed rules:

  • Write colors using lowercase ("#a12345", not "#A12345").
  • Write colors in the most compact form (if @chad wants -- this happens in minification anyway).
  • No rule alphabetization -- see https://secure.phabricator.com/D3223#comment-15 for my rationale. I'm fine with alphabetizing or enforcing some other order if you guys prefer.
  • Omit quotes for url() (this gets rewritten in minification anyway).
  • Single space after :; do not align rule bodies.

Flexible on any of this, but we should pick some set of rules and then apply it to the whole codebase.

Related Objects

StatusAssignedTask
Openepriestley

Event Timeline

epriestley triaged this task as Normal priority.
epriestley added a project: Arcanist.
epriestley added subscribers: epriestley, chad, btrahan, vrana.

I personally use all of these and I agree with them. We should probably also have some rule for indenting.

See also T2253 -- I moved all the z-index rules to "z-index.css" to make them easier to keep track of. We should detect new z-index rules not in the z-index.css file, so long as we're keeping our z-indexes in a single file.

chad changed the visibility from "All Users" to "Public (No Login Required)".Jul 3 2015, 4:07 AM