Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

The new Gtk3 themes seem to be CSS/SASS based, so the question is: How do I ask the browser for the current theme settings such that I can style buttons or other elements in a webpage to match the system theme?

If there's no universal way, is there a userscript for Chrome or Firefox extension you can recommend that will grab this information from the OS and push it in to the browser in some way that I can access from the web-app side?

Edit:

I appreciate the response from @gertvdijk, but I more mean how I can grab the style for a particular element and apply it to some random div. If I were building a menu-system from a ul and li elements for example. How do I grab the appropriate style from the theme (fg/bg from non text area) would be a fitting example.

share|improve this question
    
I believe the browser already applies GTK themes if you're putting regular HTML elements in the body. E.g. <input type="button">I'm a button</input> should be styled by default in the system theme. So, could you please elaborate more on what you're trying to achieve exactly? –  gertvdijk Dec 30 '12 at 20:49
    
Thanks. check the edit –  hbdgaf Dec 30 '12 at 21:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.