Opened 11 years ago

Last modified 11 years ago

#13148 closed defect

Dojo CSS build removes too much whitespace — at Version 2

Reported by: Rob Retchless Owned by: Rawld Gill
Priority: high Milestone: 1.7
Component: BuildSystem Version: 1.5
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by dante)

In IBM Rational Jazz, one of our CSS files (PaginationControl?.css) is formatted so that each class is on a separate line. Example:

.jazz-ui-PaginationControl
.off:hover
{
    color: #666666;
    text-decoration: none;
} 

.jazz-ui-PaginationControl
.on
{
    color: #3087B3;
    cursor: pointer;
} 

This is a perfectly valid way to write child selectors, but the standard dojo compression removes new lines without preserving the whitespace, with the following result:

.jazz-ui-PaginationControl.off:hover{
    color: #666666;
    text-decoration: none;
} 

.jazz-ui-PaginationControl.on{
    color: #3087B3;
    cursor: pointer;
}

The resultant compressed CSS output should be:

.jazz-ui-PaginationControl .off:hover {
    color: #666666;
    text-decoration: none;
} 

.jazz-ui-PaginationControl .on {
    color: #3087B3;
    cursor: pointer;
}

Change History (2)

comment:1 Changed 11 years ago by dante

fwiw, this (and newline-dependent css hacks) are the reason I always build with

cssOptimize=comments.keepLines

comment:2 Changed 11 years ago by dante

Description: modified (diff)
Note: See TracTickets for help on using tickets.