Master Stylesheet / Default Stylesheet / IE Hacks

Modern use of CSS for creation and formatting of Websites - and especially if working with a CSS framework (like YAML) - requires multiple CSS and works with a special CSS for problematic browsers (Internet Explorer 6). conceptcms supports these mechanisms.

Master Stylesheet

As you can create as many CSS as you need in the system, the idea of a Master-Stylesheets refers to the fact, that one CSS should be the "master" and all other CSS or just imported into this "master" (syntax: @import url("path/name.css");; in conceptcms this should be writtenas @import url(./ID_usr_style.css;).. Regarding this topic, also have a look to  Multiple CSS und Styles (CSS).

Only the Master-Stylesheet is subject of two fundamental operations for CSS in conceptcms:

In addition, conceptcms supplies a mechanism to group styles under defined comments in order to make them available in some administration interfaces (CE and WYSIWYG Editor) for selection (see CSS Conventions for the Master Stylesheet). However, this only works inside of the so-called Master-Stylesheet, which at the same time needs to be the Default-Stylesheet (see below).

Especially when working with many and complex CSS, we recommend to use the Master Stylesheet exclusively to place  styles that should be made available for CE and the WYSIWYG Editor. All other styles should be written into separate CSS that are imported into the Master Stylesheet.

Default-Stylesheet

conceptcms automatically includes one CSS in all (menu item) templates, this does not have to be done manually. This CSS needs to be defined. You do this by setting it as "default". Only one CSS can be the Default CSS - and this CSS (according to the logic described above) should be the Master Stylesheet at the same time.

To set a stylesheet as default CSS, click the icon 

in the stylesheet-list.


Set Default CSS

 

The stylesheet which is set as default CSS is now internally available, i.e. it will be automatically included into all menu item templates; see (Header (Doctype, Titel, Metadaten, ...)).

All changes made to this CSS would be internally available as well (in the working version).You can check your changes in the document preview without the changes getting applied to the productive version yet. To make changes in the CSS available for your Website, you have to publish the CSS (see Manage CSS / Stylesheet List).

Note: Publishing only refers to classes that are directly written into the Default Stylesheet, but not to styles retrieved via import of other CSS. Changes in imported CSS will be available on the Website (live version) immediately.
Important: Changing the Default CSS (=setting another CSS as default) does have an immediate effect on the public Website even if not published. Only when once set as default, every change needs to be published in order to get available on the Website.

Default-Stylesheet for IE Hacks

The well-known problems with CSS, especially caused by Internet Explorer 6, are usually covered by a separate "patch" CSS. conceptcms supports this, too. Like described above, a second Master CSS can be set a "patch default" to provide IE hacks.

Note: If you proceed like suggested for the Master-Stylesheet, in many cases, your "Patch Master" CSS only needs to have those styles that should be available for CE and/or WYSIWYG Editor and really cause trouble with IE6.

The "Patch Master"-Stylesheet is set as default with the following icon in the style list:


Set Default-Patch-Stylesheet

The "patch" default CSS will now be automatically included into all menu item templates, too (i.e. it will - like it is standard - be included via a so called "Conditional Comment").

Define Exceptions (for Imported CSS)

If you proceed like suggested for the Master-Stylesheet, it is easy to define exceptions for the inclusion of imported CSS. You might sometimes need to exclude some styles, or to include only specific styles, as maybe some menu items or documents require specific style settings. This is done on the level of menu item templates; for more information refer to Manually Modified Stylesheet Handling.