Reusing theme colors on the whole page

2 posts, 1 answers
  1. JamesD
    JamesD avatar
    26 posts
    Member since:
    Nov 2005

    Posted 09 Oct 2013 Link to this post

    Hi

    I'm using Kendo widgets extensively with changeable theme.
    Colors work just fine on Kendoui elements, the problem is with all the other elements on the pages.
    How to make them easily follow the selected theme?

    I could do a little with the help of
    http://docs.kendoui.com/getting-started/web/appearance-styling
    E.g. setting the "k-content" class for the body (that would only take care of the text and background color), "k-button" for all buttons, "k-link" for all links, etc.
    Would it be possible to automatically wrap the colors from the theme for all input/link/table/... elements on the page?
    Thanks.

     Raido

  2. Answer
    Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 11 Oct 2013 Link to this post

    Hello Raido,

    You could achieve this using jQuery API. For example on the document ready find all inputs / links/ tables and set the needed classes:

    $(document).ready(function() {
      //....
      //set class k-textbox to all input elements
      $('input').addClass('k-textbox');
    });
      Regards,
    Iliana Nikolova
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top