Given the following dynamically generated CSS:
.ui-widget-header { border: 1px solid #4297d7; background: #5c9ccc; }
How can I extract the background value for use in:
body
{
background-color: VALUE_FROM_UI_WIDGET_HEADER_GOES_HERE;
}
More details: I use jQuery-UI Themeroller and let users upload their own themes. I’d like the page’s background color to be based on a color from Themeroller. This lets them customize the background color. Can this be done only in CSS?
There’s no way to define relationships in CSS only.
You’d have to use javascript to accomplish what you want.