Difference between revisions of "MediaWiki talk:Common.css"

From Bogleheads
Jump to navigation Jump to search
(Explanation of additional class (disable display on desktop).)
(Corrected, clarified display class descriptions.)
Line 27: Line 27:
 
Use <code>class="nomobile"</code> in conjunction with <code>class="nomobile"</code> to show content only on the desktop. This class is needed on the main page to have one table version for the desktop, another version for mobile.
 
Use <code>class="nomobile"</code> in conjunction with <code>class="nomobile"</code> to show content only on the desktop. This class is needed on the main page to have one table version for the desktop, another version for mobile.
 
--[[User:LadyGeek|LadyGeek]] 17:21, 17 April 2016 (EDT)
 
--[[User:LadyGeek|LadyGeek]] 17:21, 17 April 2016 (EDT)
 +
 +
:The above description is incorrect (class is described twice) and was based on a 2012 support question. Currently, <code>class="nomobile"</code> will prevent display in a mobile device without modification to [[MediaWiki:Mobile.css]] (no need to change anything now, maybe later). Modification to [[MediaWiki:Common.css]] is still needed to block display in a desktop device.
 +
 +
:{| class="wikitable"
 +
!Class !! Display on Desktop !! Display on Mobile
 +
|-
 +
||nomobile||Y||N
 +
|-
 +
||onlymobile||N || Y
 +
|}
 +
:--[[User:LadyGeek|LadyGeek]] 14:04, 8 April 2020 (UTC)

Revision as of 09:04, 8 April 2020

This page needs to be updated with content from Wikipedia's MediaWiki:Common.css so that we can use table classes, like infoboxes. Only an administrator can edit this page. --Spangineer (talk) 20:12, 11 September 2008 (UTC)

We don't need to update this page as frequently as Wikipedia, perhaps when the MediaWiki software is updated. Be sure to add the prosilver header below.

/* Implement phpBB prosilver navbar */
.headerbar {
   background-color: #12A3EB;
   background-image: url('http://www.bogleheads.org/forum/styles/prosilver/theme/images/bg_header.gif');
   background-repeat:repeat-x;
   color: #FFFFFF;
}

--LadyGeek 19:55, 20 November 2012 (CST)

The code is updated to match Wikipedia, but for the version dated 02 November 2013 (not the latest). One of the editors has disabled the default nowrap behaviour for list items in horizontal lists, which is causing quite a discussion in the Talk page (to fix IE problems). I'll wait for the dust to settle. --LadyGeek 17:05, 17 November 2013 (CST)

Disable display on desktop

Added a class to disable content display for desktops. MobileFrontEnd does not load MediaWiki:Common.css, so it won't see this class. See: Topic on Extension talk:MobileFrontend

/* Only for mobile devices */
.onlymobile {
display:none;
}

Use class="nomobile" in conjunction with class="nomobile" to show content only on the desktop. This class is needed on the main page to have one table version for the desktop, another version for mobile. --LadyGeek 17:21, 17 April 2016 (EDT)

The above description is incorrect (class is described twice) and was based on a 2012 support question. Currently, class="nomobile" will prevent display in a mobile device without modification to MediaWiki:Mobile.css (no need to change anything now, maybe later). Modification to MediaWiki:Common.css is still needed to block display in a desktop device.
Class Display on Desktop Display on Mobile
nomobile Y N
onlymobile N Y
--LadyGeek 14:04, 8 April 2020 (UTC)