Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Mediawiki

Issues with wikitable in 1.19

 

 

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded


stipen.treublatt at gmx

May 31, 2012, 5:00 AM

Post #1 of 5 (406 views)
Permalink
Issues with wikitable in 1.19

We are having some issues with the wikitable-css-class in 1.19.0.
We want to be able to define a background color for the table and a
different one for th in MediaWiki:Common.css, but if we do this without
marking it as important, it is being ignored. And if we define it as
important, we are not able to override the color on wiki articles.

Simply put, why is our declaration of wikitable in MediaWiki:Common.css
being ignored? Shouldnt MediaWiki:Common.css be loaded after everything
defined by MediaWiki?

Greetings
Stip

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


Platonides at gmail

May 31, 2012, 10:27 AM

Post #2 of 5 (402 views)
Permalink
Re: Issues with wikitable in 1.19 [In reply to]

On 31/05/12 14:00, Stip wrote:
> We are having some issues with the wikitable-css-class in 1.19.0.
> We want to be able to define a background color for the table and a
> different one for th in MediaWiki:Common.css, but if we do this without
> marking it as important, it is being ignored. And if we define it as
> important, we are not able to override the color on wiki articles.
>
> Simply put, why is our declaration of wikitable in MediaWiki:Common.css
> being ignored? Shouldnt MediaWiki:Common.css be loaded after everything
> defined by MediaWiki?
>
> Greetings
> Stip

Different specificity? What instructions are you using?
MediaWiki:Common.css *is* being loaded later. You can try debug the page
declarations with any CSS inspector tool.
You may want to add ?debug=true to the url to skip the css minification,
though.


_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


stipen.treublatt at gmx

May 31, 2012, 10:43 AM

Post #3 of 5 (403 views)
Permalink
Re: Issues with wikitable in 1.19 [In reply to]

Am 31.05.2012 19:27, schrieb Platonides:
> Different specificity? What instructions are you using?
> MediaWiki:Common.css *is* being loaded later. You can try debug the
> page declarations with any CSS inspector tool. You may want to add
> ?debug=true to the url to skip the css minification, though.
Thanks for the reply. :)
Unfortunately we all are css-noobs, so all we do is C&P and then
changing it according to what we need... which might be the problem.

The code used at the moment is:

/* Wikitable */
table.wikitable {
margin: 1em 1em 1em 5px;
background-color: #ffffff;
border: 1px #cccc99 solid;
empty-cells:show;
font-size: 95%;
}

table.wikitable> tr> th
table.wikitable> tr> td
table.wikitable> *> tr> th
table.wikitable> *> tr> td {
border: 1px #cccc99 solid;
padding: 0.2em;
}

table.wikitable> tr> th
table.wikitable> *> tr> th {
background-color: #ffec8b;
text-align: center;
}

.wikitable th {
background-color: #ffec8b ! important;
text-align: center;
}

If we delete the last .wikitable th, the color of th is not the color we specify in table.wikitable> tr> th.
Same thing happens if we try it without the "important"-declaration. Also, the background-color #ffffff overwrites everything we
declare when using wikitable in articles.

Maybe you know a quick way to fix this? I will try using a css-inspection tool, thanks for that. :)

Greetings
Stip



_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


matma.rex at gmail

May 31, 2012, 10:48 AM

Post #4 of 5 (403 views)
Permalink
Re: Issues with wikitable in 1.19 [In reply to]

This is invalid CSS. You separate the selectos with a comma, not with
a newline. So instead of:

table.wikitable> tr> th
table.wikitable> tr> td
table.wikitable> *> tr> th
table.wikitable> *> tr> td {
border: 1px #cccc99 solid;
padding: 0.2em;
}

do

table.wikitable> tr> th,
table.wikitable> tr> td,
table.wikitable> *> tr> th,
table.wikitable> *> tr> td {
border: 1px #cccc99 solid;
padding: 0.2em;
}

etc.

-- Matma Rex

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


stipen.treublatt at gmx

May 31, 2012, 11:27 AM

Post #5 of 5 (408 views)
Permalink
Re: Issues with wikitable in 1.19 [In reply to]

Thanks! :D
I thought I copied that from shared.css, but obviously I forgot the
commas. That explains a lot!

Am 31.05.2012 19:48, schrieb Bartosz DziewoƄski:
> This is invalid CSS. You separate the selectos with a comma, not with
> a newline. So instead of:
>
> table.wikitable> tr> th
> table.wikitable> tr> td
> table.wikitable> *> tr> th
> table.wikitable> *> tr> td {
> border: 1px #cccc99 solid;
> padding: 0.2em;
> }
>
> do
>
> table.wikitable> tr> th,
> table.wikitable> tr> td,
> table.wikitable> *> tr> th,
> table.wikitable> *> tr> td {
> border: 1px #cccc99 solid;
> padding: 0.2em;
> }
>
> etc.
>
> -- Matma Rex
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l [at] lists
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>


_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.