New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support CSS aggregation #334

Closed
obigard opened this Issue Sep 11, 2014 · 7 comments

Comments

Projects
None yet
3 participants
@obigard

obigard commented Sep 11, 2014

CSS aggregation should be supported. For each 'output file' the list (in order) of the file to include must be provided.

@cescoffier cescoffier changed the title from CSS aggregator to Support CSS aggregation Sep 12, 2014

@cescoffier

This comment has been minimized.

Show comment
Hide comment
@cescoffier

cescoffier Sep 12, 2014

Member

There are a couple of aspect to take into account:

  • Prevent more than 4095 CSS selectors in an aggregated CSS file (IE 6-9 limitation).
  • Gzip support. All aggregated files can be pre-compressed into a .gz file and served directly. This is faster then gzipping the file on each request.
  • Combine CSS files by using media queries.
Member

cescoffier commented Sep 12, 2014

There are a couple of aspect to take into account:

  • Prevent more than 4095 CSS selectors in an aggregated CSS file (IE 6-9 limitation).
  • Gzip support. All aggregated files can be pre-compressed into a .gz file and served directly. This is faster then gzipping the file on each request.
  • Combine CSS files by using media queries.
@jbrey

This comment has been minimized.

Show comment
Hide comment
@jbrey

jbrey Sep 12, 2014

Contributor

About the IE limitation, I think that "prevent more than 4095 CSS selectors" must be an option because it may happen to generate aggregated css by targetted platforms.
Therefore it should not apply the same limitation for the other browsers.

JB

Contributor

jbrey commented Sep 12, 2014

About the IE limitation, I think that "prevent more than 4095 CSS selectors" must be an option because it may happen to generate aggregated css by targetted platforms.
Therefore it should not apply the same limitation for the other browsers.

JB

@jbrey

This comment has been minimized.

Show comment
Hide comment
@jbrey

jbrey Sep 15, 2014

Contributor

Here are some investigations made today about existing solutions.

From what I saw, almost every existing tools are based on YUI compressor and/or Google closure.

For instance minify-maven-plugin allow configuring the engine inside the configuration and seems to make the aggregation/concatenation/combination (whatever the term) in java. (another less advanced maven plugin which only handles js: webminifier-maven-plugin)

There are also various java library that helps to do the job:

Another approach would be, as wisdom is able to run npm, to rely on node based tools. Here are some variants:

At the end, using yui compressor seems to be the easiest solution whether other solutions open more perspective and possibilities.
I think wro4j seems interesting for wisdom as it’s java-based. Bringing grunt, gulp or Yeoman is heavy and would imply to configure at least two different build system (maven and the node solution) so I’m not sure it’s a good approach.

This comment is also relevant for #333 .

Contributor

jbrey commented Sep 15, 2014

Here are some investigations made today about existing solutions.

From what I saw, almost every existing tools are based on YUI compressor and/or Google closure.

For instance minify-maven-plugin allow configuring the engine inside the configuration and seems to make the aggregation/concatenation/combination (whatever the term) in java. (another less advanced maven plugin which only handles js: webminifier-maven-plugin)

There are also various java library that helps to do the job:

Another approach would be, as wisdom is able to run npm, to rely on node based tools. Here are some variants:

At the end, using yui compressor seems to be the easiest solution whether other solutions open more perspective and possibilities.
I think wro4j seems interesting for wisdom as it’s java-based. Bringing grunt, gulp or Yeoman is heavy and would imply to configure at least two different build system (maven and the node solution) so I’m not sure it’s a good approach.

This comment is also relevant for #333 .

@cescoffier

This comment has been minimized.

Show comment
Hide comment
@cescoffier

cescoffier Sep 15, 2014

Member

Hi,

I already used wro4j, it's really good. So we can use it. However, we may have an issue to bridge the differences between the wro4j processing model and wisdom.

Member

cescoffier commented Sep 15, 2014

Hi,

I already used wro4j, it's really good. So we can use it. However, we may have an issue to bridge the differences between the wro4j processing model and wisdom.

@cescoffier

This comment has been minimized.

Show comment
Hide comment
@cescoffier

cescoffier Dec 8, 2014

Member

I made another review. It seems that CleanCSS is the most mature 'css aggregator', heavily used in front end development. The good news is that we already have the support for clean-css.

Member

cescoffier commented Dec 8, 2014

I made another review. It seems that CleanCSS is the most mature 'css aggregator', heavily used in front end development. The good news is that we already have the support for clean-css.

@jbrey

This comment has been minimized.

Show comment
Hide comment
@jbrey

jbrey Dec 8, 2014

Contributor

I miss this one. Another thing to add in my test list :)

Thanks!

Contributor

jbrey commented Dec 8, 2014

I miss this one. Another thing to add in my test list :)

Thanks!

@cescoffier cescoffier closed this in 641cb04 Dec 8, 2014

@cescoffier

This comment has been minimized.

Show comment
Hide comment
Member

cescoffier commented Dec 8, 2014

@cescoffier cescoffier added the feature label Dec 8, 2014

@cescoffier cescoffier added this to the 0.7 milestone Dec 8, 2014

@cescoffier cescoffier self-assigned this Dec 8, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment