Kentico 8 changes how certain web parts and other components use CSS classes. This chapter provides information that can help you update the styles of the components on your website after performing the upgrade.
To learn how to fix or update the styling of specific components after upgrading to Kentico 8, see the following references:
Kentico 8 styling overview
Kentico 8 projects contain the Skin.css stylesheet by default, which provides basic styling for web parts and other components. Use custom stylesheets for your site to fine tune the appearance outlined by Skin.css.
A global Skin.css file is located in the ~/App_Themes/Global folder. Individual sites have their own dedicated Skin.css files, which import the global Skin.css stylesheet. For example, our Corporate Site sample site has its Skin.css file in the ~/App_Themes/CorporateSite folder. If you edit the file, you can see that the stylesheet imports the global Skin.css file, and contains several additional styles for the Corporate Site.
Note: The Skin.css stylesheet is included by default on all Kentico sample sites except for Blank Site and Blank Site ASPX.
All styles in Skin.css use the
.ContentBody class to have more specific selectors over certain elements.The file covers the following areas:
- Forms and filters
- Shopping cart
- Drop-down menu
- UI Dialogs
- Media library
- Image editor
- Document library
- Context menu
- Form controls (Slider, Spinner, Date time form control with calendar)
- Button groups / Vertical separated buttons
Creating custom styles for sites
The default Skin.css styles may interfere with your site's custom stylesheets.
Use one of the following approaches to implement custom styling for your website:
- Do not include Skin.css on your site, define all required styles in standard CSS stylesheets in Kentico (you can copy useful rules from Skin.css)
!importantdirective or stronger selectors (with more classes) in your CSS to override the default styles
Edit the skin stylesheets directly
Note: If you edit the global skin stylesheet, the changes affect all sites in your Kentico instance, and may be overwritten when you upgrade the site to a new version of Kentico.
LESS code base
Skin.css is generated from the LESS Skin.less file. You can modify Skin.css directly, but you lose the advantages of the structured, commented and more readable .less file.
The Skin.less file is located in ~/App_Themes/Global and includes multiple skin sub-files in the ~/App_Themes/Global/Skin folder.
If you are uncertain how to work with LESS, you can find articles describing the process at Using the LESS CSS Preprocessor for Smarter Style Sheets.