Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#13148 closed defect (fixed)

Dojo CSS build removes too much whitespace

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 (5)

comment:1 Changed 8 years ago by dante

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

cssOptimize=comments.keepLines

comment:2 Changed 8 years ago by dante

Description: modified (diff)

comment:3 Changed 8 years ago by Rawld Gill

(In [25319]) fixed bug that cssOptimize keepLines was deleting lines and visa-versa; refs #13148

comment:4 Changed 8 years ago by Rawld Gill

Resolution: fixed
Status: newclosed

comment:5 Changed 8 years ago by bill

Milestone: tbd1.7
Note: See TracTickets for help on using tickets.