Or maybe just use the !important directive. ;)

2015-06-10 13:09 GMT+02:00 janekptacijarabaci <[email protected]>
:

> e.g.
>
>
> var elms = document.querySelectorAll("div.aaa *");
>
> for (var i = 0, count = elms.length; i < count; i++) {
>   elms[i].style.lineHeight = "150%";
>   elms[i].style.fontFamily = "Tahoma";
>   elms[i].style.fontSize = "20pt";
> }
>
>
>
>
> Dne středa 10. června 2015 8:20:05 UTC+2 Ben napsal(a):
>
>> Assume I have html pages with the following schema:
>>
>> <div class="aaa">
>> ...
>>   <pre style="line-height:120%">
>>      <span style="font-family:verdana">
>>          <span style=font-size:11pt;">...
>>         </span>
>>          ...
>>      </span>
>>     ....
>>   </pre>
>> ...
>>   <pre style="line-height:110%">
>>      <span style="font-family:verdana">
>>          <span style=font-size:12pt;">...
>>         </span>
>>          ...
>>      </span>
>>     ....
>>   </pre>
>> ...
>> </div>
>>
>> I want to set for ALL elements inside <div class="aaa"> a new
>> font-family, a new font-size and a new line-height.
>> Normally more specific attributes overwrite more general attributes.
>>
>> So if I assign a global  font-family,font-size and line-height to
>> class="aaa" I need an additional way to tell from GM script
>> to disable all deeper/special corresponding attributes inside this class
>> element.
>>
>> How can I achieve this?
>>
>> Thank you
>> Ben
>>
>>
>>
>>
>>
>>
>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "greasemonkey-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/greasemonkey-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/greasemonkey-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to