WebCabin / wcDocker

wcDocker (Web Cabin Docker) is a powerful window layout system with a responsive and completely interactive design. Move, remove, create, and duplicate panel windows at any time! Organize how you wish! View the demo here:
http://docker.webcabin.org
146 stars 53 forks source link

can a theme-css be aggregated into a minified css? #102

Closed lomotelsch closed 8 years ago

lomotelsch commented 8 years ago

Hi Jeff,

as I read in your tutorial, a theme-path is needed when instantiating wcDocker to load the theme:

Notice the themePath, if your theme CSS files are not in the default 'Themes' folder, you will need to tell docker about the new path or it will not be able to initialize the default theme.

Can the theme also be included in an aggregated stylesheet anyhow?

Thanks

Lochemage commented 8 years ago

@lomotelsch

I'm not familiar with the term aggregated stylesheet, so I can't really confirm or deny whether that would work. Would you mind learning me?

AFamularo-lomoSoft commented 8 years ago

Hello Jeff,

What my colleagues mentioned is the bundling of separate css files into one css file (min.).

We have several css file for our SPA application. For the deployment we want to bundle this separated files into one minimized file.

Best, Alexander

Lochemage commented 8 years ago

@AFamularo-lomoSoft

The only thing that the theme system does is create a link element on your page which points to the CSS file for that theme. It is more for convenience, giving you an easy method of dynamically changing your theme on the fly.

You are more than welcome to embed the theme styles into a larger master sheet that you include into your page yourself.

However, you might want to introduce a small hack if you do not want wcDocker to output an error message in your log when trying to load an invalid theme file.

var myDocker = new wcDocker('.dockerContainer', {
    allowDrawers: true,
    theme: undefined
});

If the theme option is any string, even an empty one, it will think you are attempting to load a theme of that name. By setting it to undefined, you are effectively making the system think you are simply asking for the theme, rather than assigning one.

lomotelsch commented 8 years ago

perfect, thank you