Background color

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Background color

Jeffrey Barish
Until two days ago, I was able to modify the background color of a Wikipedia
page with a style sheet containing the following:

body {
    background-color: rgb(68, 68, 68) !important;
    color: rgb(204, 204, 204) !important;
}

The line for color still works, but the line for background-color does not.  
Does anyone know what changed and what I have to do now to change the
background color?

If this is not the right mailing list for this question, could someone
direct me to the right one?

Thanks.
---
Jeffrey Barish


_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Background color

Ryan Kaldari-2
Works for me. I added the background-color rule to
https://en.wikipedia.org/wiki/User:Kaldari/vector.css and it took effect
immediately.

Ryan Kaldari


On Fri, Jun 27, 2014 at 8:31 AM, Jeffrey Barish <[hidden email]>
wrote:

> Until two days ago, I was able to modify the background color of a
> Wikipedia
> page with a style sheet containing the following:
>
> body {
>     background-color: rgb(68, 68, 68) !important;
>     color: rgb(204, 204, 204) !important;
> }
>
> The line for color still works, but the line for background-color does not.
> Does anyone know what changed and what I have to do now to change the
> background color?
>
> If this is not the right mailing list for this question, could someone
> direct me to the right one?
>
> Thanks.
> ---
> Jeffrey Barish
>
>
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Background color

Jeffrey Barish
On Friday, 27 June 2014 10:24:57 Ryan Kaldari wrote:

> Works for me. I added the background-color rule to
> https://en.wikipedia.org/wiki/User:Kaldari/vector.css and it took effect
> immediately.
>
> Ryan Kaldari
>
>
> On Fri, Jun 27, 2014 at 8:31 AM, Jeffrey Barish <[hidden email]>
>
> wrote:
> > Until two days ago, I was able to modify the background color of a
> > Wikipedia
> > page with a style sheet containing the following:
> >
> > body {
> >
> >     background-color: rgb(68, 68, 68) !important;
> >     color: rgb(204, 204, 204) !important;
> >
> > }
> >
> > The line for color still works, but the line for background-color does
> > not.
> > Does anyone know what changed and what I have to do now to change the
> > background color?
> >
> > If this is not the right mailing list for this question, could someone
> > direct me to the right one?
> >
> > Thanks.
> > ---
> > Jeffrey Barish

Ryan,

Thanks for your reply.  It is certainly interesting to know that someone is
able to get something related to work, although I don't really understand what
it is you did.  The lines of css that I provided still do not work for me.  
Perhaps it would help for me to provide a little more information about what I
am doing as it most likely is different from what you tried.

I am viewing Wikipedia pages using webkit in an application that I wrote.  I
attach my style sheet by specifying user_stylesheet_uri.  I know that webkit
is reading my css because I could set the background color until 2 days ago
and because I can still set the text color.  I am guessing that a css upstream
is now specifying the background color using !important so that my
specification no longer takes effect.  If so, then that specification is new
because mine used to work.  I don't understand how Wikipedia (or css, for that
matter) works well enough to guess where that change might have been made or
why.  However, if my theory is correct, then I don't see how you are able to
change the background color, unless the change that you made somehow is
upstream from the hypothetical specification of background color using
!important.

Jeff

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Background color

Isarra Yos
On 27/06/14 19:02, Jeffrey Barish wrote:

> On Friday, 27 June 2014 10:24:57 Ryan Kaldari wrote:
>> Works for me. I added the background-color rule to
>> https://en.wikipedia.org/wiki/User:Kaldari/vector.css and it took effect
>> immediately.
>>
>> Ryan Kaldari
>>
>>
>> On Fri, Jun 27, 2014 at 8:31 AM, Jeffrey Barish <[hidden email]>
>>
>> wrote:
>>> Until two days ago, I was able to modify the background color of a
>>> Wikipedia
>>> page with a style sheet containing the following:
>>>
>>> body {
>>>
>>>      background-color: rgb(68, 68, 68) !important;
>>>      color: rgb(204, 204, 204) !important;
>>>
>>> }
>>>
>>> The line for color still works, but the line for background-color does
>>> not.
>>> Does anyone know what changed and what I have to do now to change the
>>> background color?
>>>
>>> If this is not the right mailing list for this question, could someone
>>> direct me to the right one?
>>>
>>> Thanks.
>>> ---
>>> Jeffrey Barish
> Ryan,
>
> Thanks for your reply.  It is certainly interesting to know that someone is
> able to get something related to work, although I don't really understand what
> it is you did.  The lines of css that I provided still do not work for me.
> Perhaps it would help for me to provide a little more information about what I
> am doing as it most likely is different from what you tried.
>
> I am viewing Wikipedia pages using webkit in an application that I wrote.  I
> attach my style sheet by specifying user_stylesheet_uri.  I know that webkit
> is reading my css because I could set the background color until 2 days ago
> and because I can still set the text color.  I am guessing that a css upstream
> is now specifying the background color using !important so that my
> specification no longer takes effect.  If so, then that specification is new
> because mine used to work.  I don't understand how Wikipedia (or css, for that
> matter) works well enough to guess where that change might have been made or
> why.  However, if my theory is correct, then I don't see how you are able to
> change the background color, unless the change that you made somehow is
> upstream from the hypothetical specification of background color using
> !important.
>
> Jeff
>
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Kaldari used an !important, but I tried it just now without it and the
background colour change still worked  - is it possible you have some
other, more specific rule somewhere overriding the colour? The only
thing I found in the mw source css was a generic body selector without
anything special (body { background-color: #F6F6F6; }), but if that's
overridden elsewhere it would cause problems.

-I

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Background color

Jeffrey Barish
On Friday, 27 June 2014 19:16:45 Isarra Yos wrote:

> On 27/06/14 19:02, Jeffrey Barish wrote:
> > On Friday, 27 June 2014 10:24:57 Ryan Kaldari wrote:
> >> Works for me. I added the background-color rule to
> >> https://en.wikipedia.org/wiki/User:Kaldari/vector.css and it took effect
> >> immediately.
> >>
> >> Ryan Kaldari
> >>
> >>
> >> On Fri, Jun 27, 2014 at 8:31 AM, Jeffrey Barish
> >> <[hidden email]>
> >>
> >> wrote:
> >>> Until two days ago, I was able to modify the background color of a
> >>> Wikipedia
> >>> page with a style sheet containing the following:
> >>>
> >>> body {
> >>>
> >>>      background-color: rgb(68, 68, 68) !important;
> >>>      color: rgb(204, 204, 204) !important;
> >>>
> >>> }
> >>>
> >>> The line for color still works, but the line for background-color does
> >>> not.
> >>> Does anyone know what changed and what I have to do now to change the
> >>> background color?
> >>>
> >>> If this is not the right mailing list for this question, could someone
> >>> direct me to the right one?
> >>>
> >>> Thanks.
> >>> ---
> >>> Jeffrey Barish
> >
> > Ryan,
> >
> > Thanks for your reply.  It is certainly interesting to know that someone
> > is
> > able to get something related to work, although I don't really understand
> > what it is you did.  The lines of css that I provided still do not work
> > for me. Perhaps it would help for me to provide a little more information
> > about what I am doing as it most likely is different from what you tried.
> >
> > I am viewing Wikipedia pages using webkit in an application that I wrote.
> > I attach my style sheet by specifying user_stylesheet_uri.  I know that
> > webkit is reading my css because I could set the background color until 2
> > days ago and because I can still set the text color.  I am guessing that
> > a css upstream is now specifying the background color using !important so
> > that my specification no longer takes effect.  If so, then that
> > specification is new because mine used to work.  I don't understand how
> > Wikipedia (or css, for that matter) works well enough to guess where that
> > change might have been made or why.  However, if my theory is correct,
> > then I don't see how you are able to change the background color, unless
> > the change that you made somehow is upstream from the hypothetical
> > specification of background color using !important.
> >
> > Jeff
> >
> > _______________________________________________
> > Wikitech-l mailing list
> > [hidden email]
> > https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>
> Kaldari used an !important, but I tried it just now without it and the
> background colour change still worked  - is it possible you have some
> other, more specific rule somewhere overriding the colour? The only
> thing I found in the mw source css was a generic body selector without
> anything special (body { background-color: #F6F6F6; }), but if that's
> overridden elsewhere it would cause problems.
>
> -I
>
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l

I tried reducing the style sheet to the three lines

body {
    background-color: rgb(68, 68, 68) !important;
}

Doesn't work.  When I modify the second line to be

    color: rgb(204, 204, 204) !important;

the text color changes, as expected.  Since there is nothing else in my style
sheet, I conclude that the problem is not interference from a more specific
rule of my own, but the theory was certainly worth testing.


_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Background color

Ryan Kaldari-2
In reply to this post by Jeffrey Barish
I'm pretty sure that no body CSS in core has changed recently. According to
Firebug, the only background-color rule that is applied to body on en.wiki
is the one that Isarra mentioned (which doesn't use !important). Are you
trying this on English Wikipedia or a different wiki?

Ryan Kaldari

On Fri, Jun 27, 2014 at 12:02 PM, Jeffrey Barish <[hidden email]>
wrote:

> On Friday, 27 June 2014 10:24:57 Ryan Kaldari wrote:
> > Works for me. I added the background-color rule to
> > https://en.wikipedia.org/wiki/User:Kaldari/vector.css and it took effect
> > immediately.
> >
> > Ryan Kaldari
> >
> >
> > On Fri, Jun 27, 2014 at 8:31 AM, Jeffrey Barish <
> [hidden email]>
> >
> > wrote:
> > > Until two days ago, I was able to modify the background color of a
> > > Wikipedia
> > > page with a style sheet containing the following:
> > >
> > > body {
> > >
> > >     background-color: rgb(68, 68, 68) !important;
> > >     color: rgb(204, 204, 204) !important;
> > >
> > > }
> > >
> > > The line for color still works, but the line for background-color does
> > > not.
> > > Does anyone know what changed and what I have to do now to change the
> > > background color?
> > >
> > > If this is not the right mailing list for this question, could someone
> > > direct me to the right one?
> > >
> > > Thanks.
> > > ---
> > > Jeffrey Barish
>
> Ryan,
>
> Thanks for your reply.  It is certainly interesting to know that someone is
> able to get something related to work, although I don't really understand
> what
> it is you did.  The lines of css that I provided still do not work for me.
> Perhaps it would help for me to provide a little more information about
> what I
> am doing as it most likely is different from what you tried.
>
> I am viewing Wikipedia pages using webkit in an application that I wrote.
>  I
> attach my style sheet by specifying user_stylesheet_uri.  I know that
> webkit
> is reading my css because I could set the background color until 2 days ago
> and because I can still set the text color.  I am guessing that a css
> upstream
> is now specifying the background color using !important so that my
> specification no longer takes effect.  If so, then that specification is
> new
> because mine used to work.  I don't understand how Wikipedia (or css, for
> that
> matter) works well enough to guess where that change might have been made
> or
> why.  However, if my theory is correct, then I don't see how you are able
> to
> change the background color, unless the change that you made somehow is
> upstream from the hypothetical specification of background color using
> !important.
>
> Jeff
>
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Background color

Nick White
In reply to this post by Jeffrey Barish
Hi Jeff,

On Fri, Jun 27, 2014 at 01:02:43PM -0600, Jeffrey Barish wrote:
> I am viewing Wikipedia pages using webkit in an application that I wrote.  I
> attach my style sheet by specifying user_stylesheet_uri.  I know that webkit
> is reading my css because I could set the background color until 2 days ago
> and because I can still set the text color.  I am guessing that a css upstream

Actually, I'd guess that your application is adding some CSS
somewhere, one way or another (webkit is a complex beast). I
recommend you enable the webkit inspector to investigate which rules
are being applied, and how. The inspector only takes a few lines of
code to add to your application.

Nick

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Background color

Jeffrey Barish
In reply to this post by Ryan Kaldari-2
I am using English Wikipedia.

This problem is strange indeed.  I am beginning to wonder whether something
changed in webkit that is preventing it from responding to the request to
change the background color.  I think that webkit is used pretty widely,
though, so that theory seems unlikely.

On Friday, 27 June 2014 13:07:28 Ryan Kaldari wrote:

> I'm pretty sure that no body CSS in core has changed recently. According to
> Firebug, the only background-color rule that is applied to body on en.wiki
> is the one that Isarra mentioned (which doesn't use !important). Are you
> trying this on English Wikipedia or a different wiki?
>
> Ryan Kaldari
>
> On Fri, Jun 27, 2014 at 12:02 PM, Jeffrey Barish <[hidden email]>
> wrote:
> > On Friday, 27 June 2014 10:24:57 Ryan Kaldari wrote:
> > > Works for me. I added the background-color rule to
> > > https://en.wikipedia.org/wiki/User:Kaldari/vector.css and it took effect
> > > immediately.
> > >
> > > Ryan Kaldari
> > >
> > >
> > > On Fri, Jun 27, 2014 at 8:31 AM, Jeffrey Barish <
> >
> > [hidden email]>
> >
> > > wrote:
> > > > Until two days ago, I was able to modify the background color of a
> > > > Wikipedia
> > > > page with a style sheet containing the following:
> > > >
> > > > body {
> > > >
> > > >     background-color: rgb(68, 68, 68) !important;
> > > >     color: rgb(204, 204, 204) !important;
> > > >
> > > > }
> > > >
> > > > The line for color still works, but the line for background-color does
> > > > not.
> > > > Does anyone know what changed and what I have to do now to change the
> > > > background color?
> > > >
> > > > If this is not the right mailing list for this question, could someone
> > > > direct me to the right one?
> > > >
> > > > Thanks.
> > > > ---
> > > > Jeffrey Barish
> >
> > Ryan,
> >
> > Thanks for your reply.  It is certainly interesting to know that someone
> > is
> > able to get something related to work, although I don't really understand
> > what
> > it is you did.  The lines of css that I provided still do not work for me.
> > Perhaps it would help for me to provide a little more information about
> > what I
> > am doing as it most likely is different from what you tried.
> >
> > I am viewing Wikipedia pages using webkit in an application that I wrote.
> >
> >  I
> >
> > attach my style sheet by specifying user_stylesheet_uri.  I know that
> > webkit
> > is reading my css because I could set the background color until 2 days
> > ago
> > and because I can still set the text color.  I am guessing that a css
> > upstream
> > is now specifying the background color using !important so that my
> > specification no longer takes effect.  If so, then that specification is
> > new
> > because mine used to work.  I don't understand how Wikipedia (or css, for
> > that
> > matter) works well enough to guess where that change might have been made
> > or
> > why.  However, if my theory is correct, then I don't see how you are able
> > to
> > change the background color, unless the change that you made somehow is
> > upstream from the hypothetical specification of background color using
> > !important.
> >
> > Jeff
> >
> > _______________________________________________
> > Wikitech-l mailing list
> > [hidden email]
> > https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l


_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Background color

Jeffrey Barish
In reply to this post by Nick White
On Friday, 27 June 2014 16:35:17 Nick White wrote:

> Hi Jeff,
>
> On Fri, Jun 27, 2014 at 01:02:43PM -0600, Jeffrey Barish wrote:
> > I am viewing Wikipedia pages using webkit in an application that I wrote.
> > I attach my style sheet by specifying user_stylesheet_uri.  I know that
> > webkit is reading my css because I could set the background color until 2
> > days ago and because I can still set the text color.  I am guessing that
> > a css upstream
> Actually, I'd guess that your application is adding some CSS
> somewhere, one way or another (webkit is a complex beast). I
> recommend you enable the webkit inspector to investigate which rules
> are being applied, and how. The inspector only takes a few lines of
> code to add to your application.
>
> Nick

I will try this.  Thanks for the suggestion.  I was not aware of the webkit
inspector.

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Background color

Jeffrey Barish
In reply to this post by Nick White
On Friday, 27 June 2014 16:35:17 Nick White wrote:

> Hi Jeff,
>
> On Fri, Jun 27, 2014 at 01:02:43PM -0600, Jeffrey Barish wrote:
> > I am viewing Wikipedia pages using webkit in an application that I wrote.
> > I attach my style sheet by specifying user_stylesheet_uri.  I know that
> > webkit is reading my css because I could set the background color until 2
> > days ago and because I can still set the text color.  I am guessing that
> > a css upstream
>
> Actually, I'd guess that your application is adding some CSS
> somewhere, one way or another (webkit is a complex beast). I
> recommend you enable the webkit inspector to investigate which rules
> are being applied, and how. The inspector only takes a few lines of
> code to add to your application.
>
> Nick

I still have not had a chance to try Nick's suggestion, but I am wondering
about a recent discovery.  My Android phone updated the Wikipedia app last
night.  I noticed in the What's New list that one of the new items is "We went
native! Looks gorgeous on your device, and is much faster, too."  Something
changed in the styling in an effort to make the application look like native
applications.  The date of the change is 25 June, which is consistent with the
breakage of my application.  Does anyone know what actually changed?  Are the
people who actually made that change subscribers to this mailing list?  Ryan
Kaldari reported that the CSS specification for the body element did not
change, so it seems as if there is some other way to change the appearance to
make it look "native".

Jeff

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Background color

Ryan Kaldari-2
Unless your application is based on the Android Wikipedia app, this shouldn't make any difference. The change to the app was not that it was styled to "look native", the change is that the app was completely rewritten as a native Android application.

Like Nick said, the WebKit inspector is your best bet on solving the rendering issue as it will show exactly what CSS rules are being applied from where.

Ryan Kaldari

On Jun 30, 2014, at 9:23 AM, Jeffrey Barish <[hidden email]> wrote:

> On Friday, 27 June 2014 16:35:17 Nick White wrote:
>> Hi Jeff,
>>
>> On Fri, Jun 27, 2014 at 01:02:43PM -0600, Jeffrey Barish wrote:
>>> I am viewing Wikipedia pages using webkit in an application that I wrote.
>>> I attach my style sheet by specifying user_stylesheet_uri.  I know that
>>> webkit is reading my css because I could set the background color until 2
>>> days ago and because I can still set the text color.  I am guessing that
>>> a css upstream
>>
>> Actually, I'd guess that your application is adding some CSS
>> somewhere, one way or another (webkit is a complex beast). I
>> recommend you enable the webkit inspector to investigate which rules
>> are being applied, and how. The inspector only takes a few lines of
>> code to add to your application.
>>
>> Nick
>
> I still have not had a chance to try Nick's suggestion, but I am wondering
> about a recent discovery.  My Android phone updated the Wikipedia app last
> night.  I noticed in the What's New list that one of the new items is "We went
> native! Looks gorgeous on your device, and is much faster, too."  Something
> changed in the styling in an effort to make the application look like native
> applications.  The date of the change is 25 June, which is consistent with the
> breakage of my application.  Does anyone know what actually changed?  Are the
> people who actually made that change subscribers to this mailing list?  Ryan
> Kaldari reported that the CSS specification for the body element did not
> change, so it seems as if there is some other way to change the appearance to
> make it look "native".
>
> Jeff
>
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Background color

Jeffrey Barish
In reply to this post by Nick White
On Friday, 27 June 2014 16:35:17 Nick White wrote:

> Hi Jeff,
>
> On Fri, Jun 27, 2014 at 01:02:43PM -0600, Jeffrey Barish wrote:
> > I am viewing Wikipedia pages using webkit in an application that I wrote.
> > I attach my style sheet by specifying user_stylesheet_uri.  I know that
> > webkit is reading my css because I could set the background color until 2
> > days ago and because I can still set the text color.  I am guessing that
> > a css upstream
> Actually, I'd guess that your application is adding some CSS
> somewhere, one way or another (webkit is a complex beast). I
> recommend you enable the webkit inspector to investigate which rules
> are being applied, and how. The inspector only takes a few lines of
> code to add to your application.
>
> Nick

I finally had a chance to try Nick's suggestion.  Using inspector, I was able
to fix the problem.  I believe that there is a new layer.  The body element had
the background color that I set, but the new layer was on top and it had a
white background.  I changed the background color of that layer to solve the
problem.  I was also able to make many other adjustments to improve the
appearance thanks to the information I found in inspector -- and I barely
tapped its capabilities.

Thanks to all for the support and especially to Nick for telling me about
inspector.

Jeff

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l