rtl.css 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. /*
  2. Right-to-left fixes for MonoBook.
  3. Places sidebar on right, tweaks various alignment issues.
  4. Works mostly ok nicely on Safari 1.2.1; fine in Mozilla.
  5. Safari bugs (1.2.1):
  6. * Tabs are still appearing in left-to-right order. (Try after localizing)
  7. Opera bugs (7.23 linux):
  8. * Some bits of ltr text (sidebar box titles) have forward and backward versions overlapping each other
  9. IE/mac bugs:
  10. * The thing barfs on Hebrew and Arabic anyway, so no point testing.
  11. Missing features due to lack of support:
  12. * external link icons
  13. To test:
  14. * Opera6
  15. * IE 5.0
  16. * etc
  17. */
  18. body {
  19. direction: rtl;
  20. unicode-bidi: embed;
  21. }
  22. #column-content {
  23. margin: 0 -12.2em 0 0;
  24. float: left;
  25. }
  26. #column-content #content{
  27. margin-left: 0;
  28. margin-right: 12.2em;
  29. border-right: 1px solid #aaaaaa;
  30. border-left: none;
  31. }
  32. html > body .portlet {
  33. float: right;
  34. clear: right;
  35. }
  36. .editsection {
  37. float: left;
  38. margin-right: 5px;
  39. margin-left: 0; /* bug 9122: undo default LTR */
  40. }
  41. /* recover IEMac (might be fine with the float, but usually it's close to IE */
  42. *>body .portlet {
  43. float: none;
  44. clear: none;
  45. }
  46. .pBody {
  47. padding-right: 0.8em;
  48. padding-left: 0.5em;
  49. }
  50. /* Fix alignment */
  51. .documentByLine,
  52. .portletDetails,
  53. .portletMore,
  54. #p-personal {
  55. text-align: left;
  56. }
  57. div div.thumbcaption {
  58. text-align: right;
  59. }
  60. div.magnify,
  61. #p-logo {
  62. left: auto;
  63. right: 0;
  64. }
  65. #p-personal {
  66. left: auto;
  67. right: 0;
  68. }
  69. #p-cactions {
  70. left: auto;
  71. right: 11.5em;
  72. padding-left: 0;
  73. padding-right: 1em;
  74. }
  75. #p-cactions li {
  76. margin-left: 0.3em;
  77. margin-right: 0;
  78. float: right;
  79. }
  80. * html #p-cactions li a {
  81. display: block;
  82. padding-bottom: 0;
  83. }
  84. * html #p-cactions li a:hover {
  85. padding-bottom: 0.2em;
  86. }
  87. /* offsets to distinguish the tab groups */
  88. li#ca-talk {
  89. margin-right: auto;
  90. margin-left: 1.6em;
  91. }
  92. li#ca-watch,li#ca-unwatch {
  93. margin-right: 1.6em !important;
  94. }
  95. /* Fix margins for non-css2 browsers */
  96. /* top right bottom left */
  97. ul {
  98. margin-left: 0;
  99. margin-right: 1.5em;
  100. }
  101. ol {
  102. margin-left: 0;
  103. margin-right: 2.4em;
  104. }
  105. dd {
  106. margin-left: 0;
  107. margin-right: 1.6em;
  108. }
  109. #contentSub {
  110. margin-right: 1em;
  111. margin-left: 0;
  112. }
  113. .tocindent {
  114. margin-left: 0;
  115. margin-right: 2em;
  116. }
  117. div.tright, div.floatright, table.floatright {
  118. clear: none;
  119. }
  120. div.tleft, div.floatleft, table.floatleft {
  121. clear: left;
  122. }
  123. #p-personal li {
  124. margin-left: 0;
  125. margin-right: 1em;
  126. }
  127. li#ca-talk,
  128. li#ca-watch {
  129. margin-right: auto;
  130. margin-left: 1.6em;
  131. }
  132. #p-personal li {
  133. float: left;
  134. }
  135. /* Fix link icons
  136. .external, a.feedlink {
  137. padding: 0 !important;
  138. background: none !important;
  139. }
  140. */
  141. #footer {
  142. clear: both;
  143. }
  144. #f-poweredbyico {
  145. float: left;
  146. height: 1%;
  147. }
  148. #f-copyrightico {
  149. float: right;
  150. height: 1%;
  151. }
  152. * html #footer {
  153. margin-left: 0;
  154. margin-right: 13.6em;
  155. border-left: 0;
  156. border-right: 1px solid #fabd23;
  157. }
  158. * html #column-content {
  159. float: none;
  160. margin-left: 0;
  161. margin-right: 0;
  162. }
  163. * html #column-content #content {
  164. margin-left: 0;
  165. margin-top: 3em;
  166. }
  167. * html #column-one { right: 0; }
  168. /* js pref toc */
  169. #preftoc {
  170. margin-right: 1em;
  171. }
  172. .errorbox, .successbox, #preftoc li, .prefsection fieldset {
  173. float: right;
  174. }
  175. .prefsection {
  176. padding-right: 2em;
  177. }
  178. /* workaround for moz bug, displayed bullets on left side */
  179. #toc ul {
  180. text-align: right;
  181. }
  182. #toc ul ul {
  183. margin: 0 2em 0 0;
  184. }
  185. input#wpSave, input#wpDiff {
  186. margin-right: 0;
  187. margin-left: .33em;
  188. }
  189. #userlogin {
  190. float: right;
  191. margin: 0 0 1em 3em;
  192. }
  193. /* Convenience links to edit block, delete and protect reasons */
  194. p.mw-ipb-conveniencelinks, p.mw-protect-editreasons,
  195. p.mw-filedelete-editreasons, p.mw-delete-editreasons {
  196. float: left;
  197. }
  198. .toggle {
  199. margin-left: 0em;
  200. margin-right: 2em;
  201. }
  202. table.filehistory th {
  203. text-align: right;
  204. }
  205. /**
  206. * Lists:
  207. * The following lines don't have a visible effect on non-Gecko browsers
  208. * They fix a problem ith Gecko browsers rendering lists to the right of
  209. * left-floated objects in an RTL layout.
  210. */
  211. html > body div#bodyContent ul {
  212. display: table;
  213. }
  214. html > body div#bodyContent ul#filetoc {
  215. display: block;
  216. }
  217. /* Special:Prefixindex styling */
  218. td#mw-prefixindex-nav-form {
  219. text-align: left;
  220. }