| OLD | NEW |
| 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. */ | 3 * found in the LICENSE file. */ |
| 4 | 4 |
| 5 tabbox { | 5 tabbox { |
| 6 -webkit-box-orient: vertical; | 6 -webkit-box-orient: vertical; |
| 7 display: -webkit-box; | 7 display: -webkit-box; |
| 8 } | 8 } |
| 9 | 9 |
| 10 tabs { | 10 tabs { |
| 11 -webkit-padding-start: 8px; | 11 -webkit-padding-start: 8px; |
| 12 background: -webkit-linear-gradient(white, rgb(243, 243, 243)); | 12 background: -webkit-linear-gradient(white, rgb(243, 243, 243)); |
| 13 border-bottom: 1px solid rgb(160, 160, 160); | 13 border-bottom: 1px solid rgb(160, 160, 160); |
| 14 display: -webkit-box; | 14 display: -webkit-box; |
| 15 margin: 0; | 15 margin: 0; |
| 16 } | 16 } |
| 17 | 17 |
| 18 /* New users of tabs.css should add 'new-style-tabs' to the class list of any |
| 19 * 'tabs' or 'tabpanels' elements. |
| 20 * |
| 21 * TODO(rfevang): Remove when all users are converted to the new style. |
| 22 * (crbug.com/247772). |
| 23 */ |
| 24 tabs.new-style-tabs { |
| 25 -webkit-padding-start: 9px; |
| 26 background: #fbfbfb; |
| 27 border-bottom: 1px solid #c8c8c8; |
| 28 padding-top: 14px; |
| 29 } |
| 30 |
| 18 tabs > * { | 31 tabs > * { |
| 19 -webkit-margin-start: 5px; | 32 -webkit-margin-start: 5px; |
| 20 -webkit-transition: border-color 150ms, background-color 150ms; | 33 -webkit-transition: border-color 150ms, background-color 150ms; |
| 21 background: rgba(160, 160, 160, .3); | 34 background: rgba(160, 160, 160, .3); |
| 22 border: 1px solid rgba(160, 160, 160, .3); | 35 border: 1px solid rgba(160, 160, 160, .3); |
| 23 border-bottom: 0; | 36 border-bottom: 0; |
| 24 border-top-left-radius: 3px; | 37 border-top-left-radius: 3px; |
| 25 border-top-right-radius: 3px; | 38 border-top-right-radius: 3px; |
| 26 cursor: default; | 39 cursor: default; |
| 27 display: block; | 40 display: block; |
| 28 min-width: 4em; | 41 min-width: 4em; |
| 29 padding: 2px 10px; | 42 padding: 2px 10px; |
| 30 text-align: center; | 43 text-align: center; |
| 31 } | 44 } |
| 32 | 45 |
| 46 tabs.new-style-tabs > * { |
| 47 -webkit-margin-start: 0; |
| 48 -webkit-transition: none; |
| 49 background: #fbfbfb; |
| 50 border: 1px solid #fbfbfb; |
| 51 border-bottom: 0; |
| 52 border-radius: 0; |
| 53 min-width: 0; |
| 54 padding: 4px 9px 4px 10px; |
| 55 } |
| 56 |
| 33 tabs > :not([selected]) { | 57 tabs > :not([selected]) { |
| 34 background: rgba(238, 238, 238, .3); | 58 background: rgba(238, 238, 238, .3); |
| 35 } | 59 } |
| 36 | 60 |
| 61 tabs.new-style-tabs > :not([selected]) { |
| 62 background: #fbfbfb; |
| 63 color: #646464; |
| 64 } |
| 65 |
| 37 tabs > :not([selected]):hover { | 66 tabs > :not([selected]):hover { |
| 38 background: rgba(247, 247, 247, .3); | 67 background: rgba(247, 247, 247, .3); |
| 39 } | 68 } |
| 40 | 69 |
| 70 tabs.new-style-tabs > :not([selected]):hover { |
| 71 background: #fbfbfb; |
| 72 color: black; |
| 73 } |
| 74 |
| 41 tabs > [selected] { | 75 tabs > [selected] { |
| 42 -webkit-transition: none; | 76 -webkit-transition: none; |
| 43 background: white; | 77 background: white; |
| 44 border-color: rgb(160, 160, 160); | 78 border-color: rgb(160, 160, 160); |
| 45 margin-bottom: -1px; | 79 margin-bottom: -1px; |
| 46 position: relative; | 80 position: relative; |
| 47 z-index: 0; | 81 z-index: 0; |
| 48 } | 82 } |
| 49 | 83 |
| 84 tabs.new-style-tabs > [selected] { |
| 85 background: #fbfbfb; |
| 86 border-color: #c8c8c8; |
| 87 font-weight: bold; |
| 88 } |
| 89 |
| 50 tabs:focus { | 90 tabs:focus { |
| 51 outline: none; | 91 outline: none; |
| 52 } | 92 } |
| 53 | 93 |
| 54 html.focus-outline-visible tabs:focus > [selected] { | 94 html.focus-outline-visible tabs:focus > [selected] { |
| 55 outline: 5px auto -webkit-focus-ring-color; | 95 outline: 5px auto -webkit-focus-ring-color; |
| 56 outline-offset: -2px; | 96 outline-offset: -2px; |
| 57 } | 97 } |
| 58 | 98 |
| 59 tabpanels { | 99 tabpanels { |
| 60 -webkit-box-flex: 1; | 100 -webkit-box-flex: 1; |
| 61 background: white; | 101 background: white; |
| 62 box-shadow: 2px 2px 5px rgba(0, 0, 0, .2); | 102 box-shadow: 2px 2px 5px rgba(0, 0, 0, .2); |
| 63 display: -webkit-box; | 103 display: -webkit-box; |
| 64 padding: 5px 15px 0 15px; | 104 padding: 5px 15px 0 15px; |
| 65 } | 105 } |
| 66 | 106 |
| 107 tabpanels.new-style-tabs { |
| 108 background: #fbfbfb; |
| 109 box-shadow: none; |
| 110 padding: 0 20px; |
| 111 } |
| 112 |
| 67 tabpanels > * { | 113 tabpanels > * { |
| 68 -webkit-box-flex: 1; | 114 -webkit-box-flex: 1; |
| 69 display: none; | 115 display: none; |
| 70 } | 116 } |
| 71 | 117 |
| 72 tabpanels > [selected] { | 118 tabpanels > [selected] { |
| 73 display: block; | 119 display: block; |
| 74 } | 120 } |
| OLD | NEW |