Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | %if 0 |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | %endif |
michael@0 | 6 | |
michael@0 | 7 | %define tabCurveWidth 30px |
michael@0 | 8 | %define tabCurveHalfWidth 15px |
michael@0 | 9 | |
michael@0 | 10 | /* image preloading hack */ |
michael@0 | 11 | #tabbrowser-tabs::before { |
michael@0 | 12 | /* Because of bug 853415, we need to ordinal this to the first position: */ |
michael@0 | 13 | -moz-box-ordinal-group: 0; |
michael@0 | 14 | content: ''; |
michael@0 | 15 | display: block; |
michael@0 | 16 | background-image: |
michael@0 | 17 | url(chrome://browser/skin/tabbrowser/tab-background-end.png), |
michael@0 | 18 | url(chrome://browser/skin/tabbrowser/tab-background-middle.png), |
michael@0 | 19 | url(chrome://browser/skin/tabbrowser/tab-background-start.png); |
michael@0 | 20 | } |
michael@0 | 21 | |
michael@0 | 22 | #tabbrowser-tabs { |
michael@0 | 23 | min-height: @tabMinHeight@; |
michael@0 | 24 | } |
michael@0 | 25 | |
michael@0 | 26 | .tabbrowser-tab, |
michael@0 | 27 | .tabs-newtab-button { |
michael@0 | 28 | -moz-appearance: none; |
michael@0 | 29 | background-color: transparent; |
michael@0 | 30 | border-radius: 0; |
michael@0 | 31 | border-width: 0; |
michael@0 | 32 | margin: 0; |
michael@0 | 33 | padding: 0; |
michael@0 | 34 | } |
michael@0 | 35 | |
michael@0 | 36 | .tabbrowser-tab { |
michael@0 | 37 | -moz-box-align: stretch; |
michael@0 | 38 | } |
michael@0 | 39 | |
michael@0 | 40 | .tabbrowser-tab[remote] { |
michael@0 | 41 | text-decoration: underline; |
michael@0 | 42 | } |
michael@0 | 43 | |
michael@0 | 44 | /* The selected tab should appear above adjacent tabs, .tabs-newtab-button and the highlight of #nav-bar */ |
michael@0 | 45 | .tabbrowser-tab[selected=true] { |
michael@0 | 46 | position: relative; |
michael@0 | 47 | z-index: 2; |
michael@0 | 48 | } |
michael@0 | 49 | |
michael@0 | 50 | .tab-background-middle { |
michael@0 | 51 | -moz-box-flex: 1; |
michael@0 | 52 | background-clip: padding-box; |
michael@0 | 53 | border-left: @tabCurveHalfWidth@ solid transparent; |
michael@0 | 54 | border-right: @tabCurveHalfWidth@ solid transparent; |
michael@0 | 55 | margin: 0 -@tabCurveHalfWidth@; |
michael@0 | 56 | } |
michael@0 | 57 | |
michael@0 | 58 | .tab-content { |
michael@0 | 59 | -moz-padding-end: 9px; |
michael@0 | 60 | -moz-padding-start: 9px; |
michael@0 | 61 | } |
michael@0 | 62 | |
michael@0 | 63 | .tab-throbber, |
michael@0 | 64 | .tab-icon-image, |
michael@0 | 65 | .tab-close-button { |
michael@0 | 66 | margin-top: 1px; |
michael@0 | 67 | } |
michael@0 | 68 | |
michael@0 | 69 | .tab-throbber, |
michael@0 | 70 | .tab-icon-image { |
michael@0 | 71 | height: 16px; |
michael@0 | 72 | width: 16px; |
michael@0 | 73 | } |
michael@0 | 74 | |
michael@0 | 75 | .tab-icon-image { |
michael@0 | 76 | list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png"); |
michael@0 | 77 | } |
michael@0 | 78 | |
michael@0 | 79 | .tab-throbber { |
michael@0 | 80 | list-style-image: url("chrome://browser/skin/tabbrowser/connecting.png"); |
michael@0 | 81 | } |
michael@0 | 82 | |
michael@0 | 83 | .tab-throbber[progress] { |
michael@0 | 84 | list-style-image: url("chrome://browser/skin/tabbrowser/loading.png"); |
michael@0 | 85 | } |
michael@0 | 86 | |
michael@0 | 87 | .tab-throbber:not([pinned]), |
michael@0 | 88 | .tab-icon-image:not([pinned]) { |
michael@0 | 89 | -moz-margin-end: 6px; |
michael@0 | 90 | } |
michael@0 | 91 | |
michael@0 | 92 | .tab-label { |
michael@0 | 93 | -moz-margin-end: 0; |
michael@0 | 94 | -moz-margin-start: 0; |
michael@0 | 95 | } |
michael@0 | 96 | |
michael@0 | 97 | .tab-close-button { |
michael@0 | 98 | -moz-margin-start: 4px; |
michael@0 | 99 | -moz-margin-end: -2px; |
michael@0 | 100 | padding: 0; |
michael@0 | 101 | } |
michael@0 | 102 | |
michael@0 | 103 | .tab-background, |
michael@0 | 104 | .tabs-newtab-button { |
michael@0 | 105 | /* overlap the tab curves */ |
michael@0 | 106 | -moz-margin-end: -@tabCurveHalfWidth@; |
michael@0 | 107 | -moz-margin-start: -@tabCurveHalfWidth@; |
michael@0 | 108 | } |
michael@0 | 109 | |
michael@0 | 110 | .tabbrowser-arrowscrollbox > .arrowscrollbox-scrollbox { |
michael@0 | 111 | -moz-padding-end: @tabCurveHalfWidth@; |
michael@0 | 112 | -moz-padding-start: @tabCurveHalfWidth@; |
michael@0 | 113 | } |
michael@0 | 114 | |
michael@0 | 115 | .tab-background-start[selected=true]::after, |
michael@0 | 116 | .tab-background-start[selected=true]::before, |
michael@0 | 117 | .tab-background-start, |
michael@0 | 118 | .tab-background-end, |
michael@0 | 119 | .tab-background-end[selected=true]::after, |
michael@0 | 120 | .tab-background-end[selected=true]::before { |
michael@0 | 121 | min-height: @tabMinHeight@; |
michael@0 | 122 | width: @tabCurveWidth@; |
michael@0 | 123 | } |
michael@0 | 124 | |
michael@0 | 125 | .tabbrowser-tab:not([selected=true]), |
michael@0 | 126 | .tabbrowser-tab:-moz-lwtheme { |
michael@0 | 127 | color: inherit; |
michael@0 | 128 | } |
michael@0 | 129 | |
michael@0 | 130 | /* Selected tab */ |
michael@0 | 131 | |
michael@0 | 132 | /* |
michael@0 | 133 | Tab background pseudo-elements which are positioned above .tab-background-start/end: |
michael@0 | 134 | - ::before - provides the fill of the tab curve and is clipped to the tab shape. This is where |
michael@0 | 135 | pointer events go for the curve. |
michael@0 | 136 | - ::after - provides the border/stroke of the tab curve and is overlayed above ::before. Pointer |
michael@0 | 137 | events go through to ::before to get the proper shape. |
michael@0 | 138 | */ |
michael@0 | 139 | |
michael@0 | 140 | |
michael@0 | 141 | .tab-background-start[selected=true]::after, |
michael@0 | 142 | .tab-background-end[selected=true]::after { |
michael@0 | 143 | /* position ::after on top of its parent */ |
michael@0 | 144 | -moz-margin-start: -@tabCurveWidth@; |
michael@0 | 145 | background-size: 100% 100%; |
michael@0 | 146 | content: ""; |
michael@0 | 147 | display: -moz-box; |
michael@0 | 148 | position: relative; |
michael@0 | 149 | } |
michael@0 | 150 | |
michael@0 | 151 | .tab-background-start[selected=true]::before, |
michael@0 | 152 | .tab-background-end[selected=true]::before { |
michael@0 | 153 | /* all ::before pseudo elements */ |
michael@0 | 154 | content: ""; |
michael@0 | 155 | display: -moz-box; |
michael@0 | 156 | } |
michael@0 | 157 | |
michael@0 | 158 | .tab-background-start[selected=true]:-moz-locale-dir(ltr):not(:-moz-lwtheme)::before, |
michael@0 | 159 | .tab-background-end[selected=true]:-moz-locale-dir(rtl):not(:-moz-lwtheme)::before { |
michael@0 | 160 | background-image: url(chrome://browser/skin/tabbrowser/tab-selected-start.svg); |
michael@0 | 161 | background-size: 100% 100%; |
michael@0 | 162 | } |
michael@0 | 163 | |
michael@0 | 164 | .tab-background-end[selected=true]:-moz-locale-dir(ltr):not(:-moz-lwtheme)::before, |
michael@0 | 165 | .tab-background-start[selected=true]:-moz-locale-dir(rtl):not(:-moz-lwtheme)::before { |
michael@0 | 166 | background-image: url(chrome://browser/skin/tabbrowser/tab-selected-end.svg); |
michael@0 | 167 | background-size: 100% 100%; |
michael@0 | 168 | } |
michael@0 | 169 | |
michael@0 | 170 | /* For lightweight themes, clip the header image on start, middle, and end. */ |
michael@0 | 171 | .tab-background-start[selected=true]:-moz-locale-dir(ltr):-moz-lwtheme::before, |
michael@0 | 172 | .tab-background-end[selected=true]:-moz-locale-dir(rtl):-moz-lwtheme::before { |
michael@0 | 173 | clip-path: url(chrome://browser/content/browser.xul#tab-curve-clip-path-start); |
michael@0 | 174 | } |
michael@0 | 175 | |
michael@0 | 176 | .tab-background-end[selected=true]:-moz-locale-dir(ltr):-moz-lwtheme::before, |
michael@0 | 177 | .tab-background-start[selected=true]:-moz-locale-dir(rtl):-moz-lwtheme::before { |
michael@0 | 178 | clip-path: url(chrome://browser/content/browser.xul#tab-curve-clip-path-end); |
michael@0 | 179 | } |
michael@0 | 180 | |
michael@0 | 181 | .tab-background-start[selected=true]:-moz-locale-dir(ltr)::after, |
michael@0 | 182 | .tab-background-end[selected=true]:-moz-locale-dir(rtl)::after { |
michael@0 | 183 | background-image: url(chrome://browser/skin/tabbrowser/tab-stroke-start.png); |
michael@0 | 184 | } |
michael@0 | 185 | |
michael@0 | 186 | .tab-background-end[selected=true]:-moz-locale-dir(ltr)::after, |
michael@0 | 187 | .tab-background-start[selected=true]:-moz-locale-dir(rtl)::after { |
michael@0 | 188 | background-image: url(chrome://browser/skin/tabbrowser/tab-stroke-end.png); |
michael@0 | 189 | } |
michael@0 | 190 | |
michael@0 | 191 | .tab-background-middle[selected=true] { |
michael@0 | 192 | background-clip: padding-box, padding-box, content-box; |
michael@0 | 193 | background-color: @fgTabBackgroundColor@; |
michael@0 | 194 | background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle.png), |
michael@0 | 195 | @fgTabTexture@, |
michael@0 | 196 | none; |
michael@0 | 197 | background-repeat: repeat-x; |
michael@0 | 198 | background-size: auto 100%; |
michael@0 | 199 | /* The padding-top combined with background-clip: content-box (the bottom-most) ensure the |
michael@0 | 200 | background-color doesn't extend above the top border. */ |
michael@0 | 201 | padding-top: 2px; |
michael@0 | 202 | } |
michael@0 | 203 | |
michael@0 | 204 | /* Selected tab lightweight theme styles. |
michael@0 | 205 | See browser-lightweightTheme.css for information about run-time changes to LWT styles. */ |
michael@0 | 206 | .tab-background-middle[selected=true]:-moz-lwtheme { |
michael@0 | 207 | background-color: transparent; |
michael@0 | 208 | background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle.png), |
michael@0 | 209 | @fgTabTextureLWT@;/*, |
michael@0 | 210 | lwtHeader;*/ |
michael@0 | 211 | /* Don't stretch the LWT header images */ |
michael@0 | 212 | background-size: auto 100%, auto 100%, auto auto; |
michael@0 | 213 | } |
michael@0 | 214 | |
michael@0 | 215 | /* These LWT styles are normally overridden by browser-lightweightTheme.css */ |
michael@0 | 216 | .tab-background-start[selected=true]:-moz-lwtheme::before, |
michael@0 | 217 | .tab-background-end[selected=true]:-moz-lwtheme::before { |
michael@0 | 218 | background-image: @fgTabTextureLWT@; |
michael@0 | 219 | } |
michael@0 | 220 | |
michael@0 | 221 | .tab-background-start[selected=true]:-moz-lwtheme::before, |
michael@0 | 222 | .tab-background-end[selected=true]:-moz-lwtheme::before, |
michael@0 | 223 | .tab-background-middle[selected=true]:-moz-lwtheme { |
michael@0 | 224 | background-color: transparent; |
michael@0 | 225 | } |
michael@0 | 226 | |
michael@0 | 227 | /* End selected tab */ |
michael@0 | 228 | |
michael@0 | 229 | /* new tab button border and gradient on hover */ |
michael@0 | 230 | .tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected=true]), |
michael@0 | 231 | .tabs-newtab-button:hover { |
michael@0 | 232 | background-image: url(chrome://browser/skin/tabbrowser/tab-background-start.png), |
michael@0 | 233 | url(chrome://browser/skin/tabbrowser/tab-background-middle.png), |
michael@0 | 234 | url(chrome://browser/skin/tabbrowser/tab-background-end.png); |
michael@0 | 235 | background-position: left bottom, @tabCurveWidth@ bottom, right bottom; |
michael@0 | 236 | background-repeat: no-repeat; |
michael@0 | 237 | background-size: @tabCurveWidth@ 100%, calc(100% - (2 * @tabCurveWidth@)) 100%, @tabCurveWidth@ 100%; |
michael@0 | 238 | } |
michael@0 | 239 | |
michael@0 | 240 | /* Tab pointer-events */ |
michael@0 | 241 | .tabbrowser-tab { |
michael@0 | 242 | pointer-events: none; |
michael@0 | 243 | } |
michael@0 | 244 | |
michael@0 | 245 | .tab-background-middle, |
michael@0 | 246 | .tabs-newtab-button, |
michael@0 | 247 | .tab-close-button { |
michael@0 | 248 | pointer-events: auto; |
michael@0 | 249 | } |
michael@0 | 250 | |
michael@0 | 251 | /* Pinned tabs */ |
michael@0 | 252 | |
michael@0 | 253 | /* Pinned tab separators need position: absolute when positioned (during overflow). */ |
michael@0 | 254 | #tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-tab[pinned]::before { |
michael@0 | 255 | height: 100%; |
michael@0 | 256 | position: absolute; |
michael@0 | 257 | } |
michael@0 | 258 | |
michael@0 | 259 | .tabbrowser-tab[pinned][titlechanged]:not([selected="true"]) > .tab-stack > .tab-content { |
michael@0 | 260 | background-image: radial-gradient(farthest-corner at center bottom, rgb(255,255,255) 3%, rgba(186,221,251,0.75) 20%, rgba(127,179,255,0.25) 40%, rgba(127,179,255,0) 70%); |
michael@0 | 261 | background-position: center bottom @tabToolbarNavbarOverlap@; |
michael@0 | 262 | background-repeat: no-repeat; |
michael@0 | 263 | background-size: 85% 100%; |
michael@0 | 264 | } |
michael@0 | 265 | |
michael@0 | 266 | /* Background tab separators (3px wide). |
michael@0 | 267 | Also show separators beside the selected tab when dragging it. */ |
michael@0 | 268 | #tabbrowser-tabs[movingtab] > .tabbrowser-tab[beforeselected]:not([last-visible-tab])::after, |
michael@0 | 269 | .tabbrowser-tab:not([selected]):not([afterselected-visible]):not([afterhovered]):not([first-visible-tab]):not(:hover)::before, |
michael@0 | 270 | #tabbrowser-tabs:not([overflow]) > .tabbrowser-tab[last-visible-tab]:not([selected]):not([beforehovered]):not(:hover)::after { |
michael@0 | 271 | -moz-margin-start: -1.5px; |
michael@0 | 272 | -moz-margin-end: -1.5px; |
michael@0 | 273 | background-image: url(chrome://browser/skin/tabbrowser/tab-separator.png); |
michael@0 | 274 | background-position: left bottom @tabToolbarNavbarOverlap@; |
michael@0 | 275 | background-repeat: no-repeat; |
michael@0 | 276 | background-size: 3px 100%; |
michael@0 | 277 | content: ""; |
michael@0 | 278 | display: -moz-box; |
michael@0 | 279 | width: 3px; |
michael@0 | 280 | } |
michael@0 | 281 | |
michael@0 | 282 | /* New tab button */ |
michael@0 | 283 | |
michael@0 | 284 | .tabs-newtab-button { |
michael@0 | 285 | width: 66px; |
michael@0 | 286 | } |