Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 1.32 KB

BP_023_en.md

File metadata and controls

53 lines (37 loc) · 1.32 KB

Use CSS instead of images

Identifiers

GreenIT V2 V3 V4
11 26 23

Categories

Life cycle Tiers Responsible
3. Implementation Network Software Architect/Developer

Indications

Priority Implementation difficulty Ecological impact
4 3 4
Saved resources
Network / Queries

Description

Use CSS properties instead of images. Style sheets are much smaller, especially when they are compressed. Calling for a stylesheet only generates a single HTTP request while using many images generates many HTTP requests (one HTTP request for each image).

Example

Rounded corners of elements should be implemented with CSS rather than images.

Prefer writing:

#frame {
     border-radius: 10px;
}
<div id="frame">
     <p>
     Lorem ipsum dolor sit amet, consectetur adipiscing elit.
     </p>
</div>

Validation rule

The number of ... is equal to or less than
images that could have been replaced by CSS 0