SnowVacation
SnowVacation

Reputation: 23

Kendo UI - Is it possible to target different styles per component?

Is it possible to target different styles per component? For example use the Silver style css for the menu and then the Default style css for the grid.

Upvotes: 1

Views: 1721

Answers (1)

Atanas Korchev
Atanas Korchev

Reputation: 30671

You can do it like this:

  1. Place the menu inside an element with class "silver":

    <div class="silver">
        <!-- menu -->
    </div>
    
  2. Modify kendo.silver.css by adding .silver in front of every CSS selector:

    .silver .k-block,
    .silver .k-widget,
    .silver .k-popup,
    .silver .k-content,
    .silver .k-dropdown .k-input
    /* the rest of kendo.silver.css */
    
  3. Place the grid inside an element with class "default":

    <div class="default">
        <!-- grid -->
    </div>
    
  4. Modify kendo.default.css by adding .default in front of every CSS selector:

    .default .k-block,
    .default .k-widget,
    .default .k-popup,
    .default .k-content,
    .default .k-dropdown .k-input
    /* the rest of kendo.default.css */
    

More info can be found in the Kendo UI forums.

Upvotes: 1

Related Questions