Results 1 to 2 of 2

Thread: Know windows dark/light theme in Javascript

  1. #1
    Sencha User
    Join Date
    Apr 2013
    Location
    Hyderabad
    Posts
    37

    Default Know windows dark/light theme in Javascript

    Hi,
    I want to assign different colors to a chart. A class cannot be used but i can specify the color automatically.
    I want to use different colors in windows dark and light themes.

    So, How do i know if it is a windows dark theme being used or light theme in javascript?

    Abhi.
    --
    Abhi

  2. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108
    Answers
    342

    Default

    Since you will have to use different css file for each theme. You can check the name of the current css file:
    document.getElementsByTagName('link').item(0).getAttribute('href');
    Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services [email protected]

    When posting code, please use BBCode's CODE tags.

    Need to include a test case use:
    The official Sencha Fiddle

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •