B
Bert
Hello,
Hoping someone here can help maybe...
I have a problem for which I surely can find a solution but I was hoping
there might be an easier solution.
The thing is I want to convert stylesheet rules. What I would like is to
obtain a stylesheet rule for an element
that isn't relative anymore to the document, but is defined for the element
itself.
For example we have a <span> element somewhere in the document tree, which
has a layout according to rule: 'body #menu .menuitem span h1'.
Now let say we want to take all html from this span and put it in another
document.
Then the stylesheet rule would become simply 'h1'.
So how can I convert a .css to be able to render different elements
stand-alone, preserving the layout.
I was thinking about parsing all the rules and walking through document
tree, and
convert each rule myself but maybe this is done already or maybe someone
can think of a more elegant solution.
thanks in advance, greetings Bert
Hoping someone here can help maybe...
I have a problem for which I surely can find a solution but I was hoping
there might be an easier solution.
The thing is I want to convert stylesheet rules. What I would like is to
obtain a stylesheet rule for an element
that isn't relative anymore to the document, but is defined for the element
itself.
For example we have a <span> element somewhere in the document tree, which
has a layout according to rule: 'body #menu .menuitem span h1'.
Now let say we want to take all html from this span and put it in another
document.
Then the stylesheet rule would become simply 'h1'.
So how can I convert a .css to be able to render different elements
stand-alone, preserving the layout.
I was thinking about parsing all the rules and walking through document
tree, and
convert each rule myself but maybe this is done already or maybe someone
can think of a more elegant solution.
thanks in advance, greetings Bert