| 1 |
// Miscellaneous assembly |
| 2 |
// Remember to use this for similar things that need to be consistent, not |
| 3 |
// for things that are basically the same thing repeated, which should use |
| 4 |
// a shared class instead. |
| 5 |
|
| 6 |
// To hide objects, but keep them accessible for screen-readers |
| 7 |
.hidden() { |
| 8 |
position: absolute; |
| 9 |
top: -9999px; |
| 10 |
left: 0; |
| 11 |
} |
| 12 |
|
| 13 |
// Icons - hides labels, but keep them accessible for screen-readers |
| 14 |
.icon() { |
| 15 |
text-indent: -99999px; |
| 16 |
border: 0; |
| 17 |
background-color: transparent; |
| 18 |
background-repeat: no-repeat; |
| 19 |
} |
| 20 |
|
| 21 |
// Icons for the page actions menus |
| 22 |
.ca-icon( @icon: '' ) { |
| 23 |
background-image: url( '@{icon}.svg' ); |
| 24 |
border: 0; |
| 25 |
background-color: transparent; |
| 26 |
background-repeat: no-repeat; |
| 27 |
background-position: left top; |
| 28 |
display: inline-block; |
| 29 |
margin-bottom: -0.35em; |
| 30 |
padding: 0 2px 0 20px; |
| 31 |
} |
| 32 |
|
| 33 |
// For use after .ca-icon() ... |
| 34 |
.ca-icon-only() { |
| 35 |
text-indent: -99999px; |
| 36 |
width: 20px; |
| 37 |
overflow: hidden; // T174314 |
| 38 |
box-sizing: border-box; |
| 39 |
padding: 0; |
| 40 |
} |
| 41 |
|
| 42 |
.box() { |
| 43 |
background: @base90; |
| 44 |
border: solid @base80; |
| 45 |
border-width: 1px 1px @border; |
| 46 |
box-shadow: 0 1px 2px 1px rgba( 0, 0, 0, 0.02 ); |
| 47 |
} |
| 48 |
|
| 49 |
.unbox() { |
| 50 |
background: transparent; |
| 51 |
border: 0; |
| 52 |
padding: 0; |
| 53 |
box-shadow: none; |
| 54 |
} |
| 55 |
|
| 56 |
.nav-block() { |
| 57 |
.box(); |
| 58 |
padding: 1.5em 1.5em 0; |
| 59 |
margin: 1em 0; |
| 60 |
line-height: 1.125; |
| 61 |
word-wrap: break-word; |
| 62 |
font-size: 0.95em; |
| 63 |
|
| 64 |
ul, |
| 65 |
li { |
| 66 |
list-style: none; |
| 67 |
margin: 0; |
| 68 |
padding: 0; |
| 69 |
} |
| 70 |
|
| 71 |
label, |
| 72 |
h3 { |
| 73 |
font-weight: normal; |
| 74 |
font-size: 1em; |
| 75 |
margin: 0.25em 0 0.75em 0; |
| 76 |
padding-bottom: 0.15em; |
| 77 |
border-bottom: solid 2px @base70; |
| 78 |
display: block; |
| 79 |
} |
| 80 |
|
| 81 |
.mw-portlet > div, |
| 82 |
.mw-portlet-body { |
| 83 |
margin-bottom: 2em; |
| 84 |
} |
| 85 |
|
| 86 |
li { |
| 87 |
padding: 0.25em 0; |
| 88 |
} |
| 89 |
} |
| 90 |
|
| 91 |
.column-right() { |
| 92 |
padding-left: 1em; |
| 93 |
box-sizing: border-box; |
| 94 |
|
| 95 |
.sidebar-chunk { |
| 96 |
.nav-block(); |
| 97 |
} |
| 98 |
} |
| 99 |
|
| 100 |
.column-left() { |
| 101 |
padding-right: 1em; |
| 102 |
box-sizing: border-box; |
| 103 |
|
| 104 |
.sidebar-chunk { |
| 105 |
.nav-block(); |
| 106 |
} |
| 107 |
} |
| 108 |
|
| 109 |
// Dropdowns |
| 110 |
.dropdown-header() { |
| 111 |
cursor: pointer; |
| 112 |
margin-bottom: -0.45em; |
| 113 |
padding-bottom: 0.45em; |
| 114 |
|
| 115 |
&::after { |
| 116 |
display: inline-block; |
| 117 |
content: ''; |
| 118 |
width: 22px; |
| 119 |
height: 12px; |
| 120 |
background-image: url( images/arrow-down-grey.svg ); |
| 121 |
background-position: center center; |
| 122 |
background-repeat: no-repeat; |
| 123 |
} |
| 124 |
} |
| 125 |
|
| 126 |
.dropdown-menu( @direction: right ) { |
| 127 |
.nav-block(); |
| 128 |
background: @background; |
| 129 |
box-shadow: 0 2px 3px 1px rgba( 0, 0, 0, 0.05 ); |
| 130 |
position: absolute; |
| 131 |
padding: 20px 2em 0; |
| 132 |
margin: 0; |
| 133 |
min-width: 9.153em; |
| 134 |
top: 2.95em; |
| 135 |
@{direction}: -1em; |
| 136 |
overflow: visible; |
| 137 |
z-index: @z-index-dropdown; |
| 138 |
} |
| 139 |
|
| 140 |
.dropdown-pokey() { |
| 141 |
&::before, |
| 142 |
&::after { |
| 143 |
transform: rotate( 360deg ); // to force some smoothing in annoying browsers |
| 144 |
border-bottom: 10px solid @base80; |
| 145 |
border-left: 10px solid transparent; |
| 146 |
border-right: 10px solid transparent; |
| 147 |
content: ''; |
| 148 |
height: 0; |
| 149 |
width: 0; |
| 150 |
position: absolute; |
| 151 |
right: 1em; |
| 152 |
z-index: ( @z-index-dropdown + 1 ); |
| 153 |
} |
| 154 |
|
| 155 |
&::before { |
| 156 |
top: -10px; |
| 157 |
} |
| 158 |
|
| 159 |
&::after { |
| 160 |
border-bottom-color: @base100; |
| 161 |
top: -8px; |
| 162 |
} |
| 163 |
} |
| 164 |
|
| 165 |
// Categories on bottom of page |
| 166 |
|
| 167 |
.categories-bottom() { |
| 168 |
#catlinks-sidebar { |
| 169 |
display: none; |
| 170 |
} |
| 171 |
|
| 172 |
#catlinks { |
| 173 |
margin: 0 @content-padding; |
| 174 |
padding: 1em 0 0.5em; |
| 175 |
|
| 176 |
li { |
| 177 |
border-left: 0; |
| 178 |
} |
| 179 |
|
| 180 |
div { |
| 181 |
margin: 0 0 0.35em; |
| 182 |
} |
| 183 |
} |
| 184 |
} |