Skip to content

Rule suggestion: use shorthand properties #66

@MikeHopley

Description

@MikeHopley

Could CSS Lint check for opportunities to use shorthand? For example:

.myObject {
padding-top: 5px;
padding-left: 10px;
padding-bottom: 5px;
padding-right: 10px;
}

This can be replaced by:

.myObject {
padding: 5px 10px;
}

The same goes for backgound, font, margin, borders, and some colour hex values (#abc instead of #aabbcc).

Useful reference: http://www.456bereastreet.com/archive/200502/efficient_css_with_shorthand_properties/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions