YUILibrary - Open source JavaScript and CSS for building richly interactive software.
Fork YUI on GitHub

YUI 2.x

Ticket #2060448 (checkedin enhancement)

Reporter


sfbugs
Opened: 08/19/08
Last modified: 02/2/10
Status: checkedin
Type: enhancement
Resolution: fixed

Owner


Isaac Z. Schlueter
Target Release: 2.4.3
Priority: P3 (normal)
Summary: Remove ;} in CSS
Description:

It appears that YUI compressor for css usually creates this type of code:

.test{color:#444;}

While that is fine, it's even better to remove the semicolon and write this:

.test{color:#444}

The result is equally valid but can reduce the filesize quite a bit in larger CSS files.

Currently I have to perform this step with a text editor, and I would very much like to see this built in to YUI compressor.

Thanks,
Steven

Type: enhancement Observed in Version: 2.4.2
Component: YUICompressor Severity: S3 (normal)
Assigned To: Isaac Z. Schlueter Target Release: 2.4.3
Location: Priority: P3 (normal)
Tags: Relates To:
Browsers: N/A
URL:
Test Information:

Change History

George

YUI Developer

Posted: 08/25/08
  • summary changed from Remove ;} in CSS to [#2166944] Remove ;} in CSS

Forwarding to component owner for consideration.

sfbugs

Posted: 01/7/09

This ticket was imported from Source Forge.

Orginially submitted by: stevendegroote

George

YUI Developer

Posted: 04/30/09

greenreaper

Posted: 06/17/09
  • browser changed to N/A
  • version changed from None to 2.4.2

If you happen to have sed around, the following command can be used in a batch/shell script to strip such semicolons (although it would of course be better for YUICompressor to do it):
sed 's/;}/}/g' input.css > output.css

George

YUI Developer

Posted: 09/23/09

Isaac Z. Schlueter

YUI Contributor

Posted: 09/24/09
  • resolution changed from None
  • status changed from assigned to checkedin

George

YUI Developer

Posted: 02/2/10
  • milestone changed to 2.4.3

George

YUI Developer

Posted: 02/2/10
  • resolution changed to fixed