Is it possible to somehow extract a single value from a CSS definition and store it as a variable?
Let's say that I have the following style definition:
Code:
.windowbg {
background-color: #ffffff;
font-size: 11px;
font-weight: normal;
font-style: normal;
font-family: Verdana, sans-serif;
color: #000000;
}
If I want to extract the "color" definition (which, in this case, is #000000), and store it as a variable, is this possible?
I am eventually trying to get it into a Perl variable, but I can certainly use javascript, if need be, to accomplish this task.
The reason I am trying to do this:
I am working on using ImageShack's syndication, which places an ImageShack uploader into an iFrame, and you can define certain style attributes of the iFrame in the query string portion of the source URL. I need to be able to pull the user's text color out of their CSS file somehow, and use that as the text color within the iFrame. The source URL looks something like:
Code:
<iframe src="http://www.imageshack.us/iframe.php?txtcolor=000000&type=forum&size=50">
Any thoughts?