[ 4 posts ]

Ian Henshaw

YUI Contributor

  • Offline
  • Profile

Minified CSS

Post Posted: Tue Nov 29, 2011 3:36 pm
+0-
What exactly are the guidelines for JavaScript component CSS? the procedure for skinnable modules is pretty clear from the build process but there are a few inconsistencies.

A skinnable JavaScript component has a base CSS file that can have "per skin" specialisations. The specialised skin CSS is concatenated to the base CSS and then overwritten and minified. But the core CSS still finds it's way to the final product. The compressed skin CSS file does not have the "-min" suffix like the compressed CSS for a "CSS only" module.

What about compressed CSS for non-skinnable JavaScript components?

Dav Glass

  • Username: davglass
  • Joined: Thu Aug 28, 2008 9:28 am
  • Posts: 2088
  • Location: Marion, IL, US
  • Twitter: davglass
  • GitHub: davglass
  • Gists: davglass
  • IRC: davglass
  • Offline
  • Profile
Tags:

Re: Minified CSS

Post Posted: Thu Dec 01, 2011 1:23 pm
+0-
The final product (final skin css file) is a contacted file, so it doesn't need a -min.css extension because there is no "non compressed" version of that file since it's concated and minimized at build time.

The core file is added to the build so implementors that don't want our skin can include that as the base for the component and write their own skin on top of it. Eventually, when there are more than one skins, the base css file will be the base for all skin variants. Then skin specific file will only contain that skins specific rules.

As for "compressed CSS" files that are for non-skinnable components (cssgrids, cssreset) these are actual modules in the system, they can be "used" in a `YUI().use()` statement so they follow our normal module guidelines.

Ian Henshaw

YUI Contributor

  • Offline
  • Profile
Tags:

Re: Minified CSS

Post Posted: Wed Dec 07, 2011 12:19 am
+0-
When the YuiLoader is pulling down components, I assume (if fetchCSS is true) that the YuiLoader also pulls down the relevant skin css for the components it is loading. If a cssmodule (e.g. cssgrids), is included in the component list for YUI().use(...), then I assume the configured filter (e.g. "minify") is respected and it pulls down cssgrids-min.css. I guess what I was trying to point out was that it seems inconsistent that the filter is respected for cssmodules, but is not for CSS assets of a js component.

When I referred to "non-skinnable JavaScript components", I mean when "component.skinnable=false". Does the YUILoader attempt to any CSS at all for these modules? Can a JavaScript module have CSS that only contains CSS relevant to the "structure essential to the component" without the need for any "cosmetic aspects such as color, imagery and typography" in a separate skin file? If so, I would assume that a JavaScript component with only CSS essential for the structure of the component should only be present and should follow the -core naming convention?

The reason I ask is: we are having to take ownership of loading CSS (by disabling fetchCSS) to work around a problem with IE where only the first 30 link tags are honoured.

Dav Glass

  • Username: davglass
  • Joined: Thu Aug 28, 2008 9:28 am
  • Posts: 2088
  • Location: Marion, IL, US
  • Twitter: davglass
  • GitHub: davglass
  • Gists: davglass
  • IRC: davglass
  • Offline
  • Profile
Tags:

Re: Minified CSS

Post Posted: Wed Dec 07, 2011 6:02 am
+0-
No, Loader will not fetch CSS for modules that have skinnable false as a config option.

The 32 link tags is a known issue in IE, your best bet is to deploy a combo server (like ours) and use that to fetch your CSS resources.
  [ 4 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum