It only appends rules, and it will automatically over-ride rules that
are already defined (the latest rule always has priority)

I notice I typed the important keyword wrong:

GM_addStyle("body{font-size:16px !important;}");

there should be no semicolon

http://webdesign.about.com/od/css/f/blcssfaqimportn.htm

On Wed, Nov 23, 2011 at 11:54 AM, Ben <[email protected]> wrote:
> Thank you.
>
> Does GM_addstyle() also OVERWRITE existing rules? or does it only add/
> append new rules?
> In other words is there a similar GM_modifyStyle() function?
>
> The detailed (final) rule look like:
>
> .articleContent .module .text p {
>    font-size: 16px;
>    line-height: 18px;
> }
>
> Can I write then:
>
> GM_addStyle("articleContent .module .text p {  font-size: 16px;  line-
> height: 18px; }");
>
> Ben
>
>
> On 23 Nov., 15:55, Sam L <[email protected]> wrote:
>> GM_addStyle("body{font-size: 16px; !important;}");
>>
>> you probably need to select specific elements in place of body and add
>> more than one rule
>>
>> try discovering which rule defined the font style in the first place
>> and use that selector.
>>
>>
>>
>> On Wed, Nov 23, 2011 at 2:58 AM, Ben <[email protected]> wrote:
>> > Assume I want to replace in all web pages from domain
>>
>> >http://www.aabbccdd.com
>>
>> > the CSS entries :
>>
>> >  "font-size: 14px;"  by  "font-size: 16px;"
>> > and
>> >  "font-height: 23px;" by  "font-height: 18px;"
>>
>> > How exactly can I achieve this with GM?
>>
>> > Ben
>>
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "greasemonkey-users" group.
>> > To post to this group, send email to [email protected].
>> > To unsubscribe from this group, send email to 
>> > [email protected].
>> > For more options, visit this group 
>> > athttp://groups.google.com/group/greasemonkey-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "greasemonkey-users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/greasemonkey-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en.

Reply via email to