| OLD | NEW |
| (Empty) |
| 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 | |
| 3 * found in the LICENSE file. | |
| 4 */ | |
| 5 | |
| 6 /* Default state **************************************************************/ | |
| 7 | |
| 8 button:not(.custom-appearance):not(.link-button), | |
| 9 input[type='button']:not(.custom-appearance):not(.link-button), | |
| 10 input[type='submit']:not(.custom-appearance):not(.link-button), | |
| 11 select { | |
| 12 -webkit-user-select: none; | |
| 13 border-radius: 2px; | |
| 14 border: 1px solid rgba(0, 0, 0, 0.25); | |
| 15 box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), | |
| 16 inset 0 1px 2px rgba(255, 255, 255, 0.75); | |
| 17 color: #444; | |
| 18 font: inherit; | |
| 19 height: 2em; | |
| 20 margin: 0 1px 0 0; | |
| 21 min-width: 4em; | |
| 22 text-shadow: 0 1px 0 rgb(240, 240, 240); | |
| 23 } | |
| 24 | |
| 25 button:not(.custom-appearance):not(.link-button), | |
| 26 input[type='button']:not(.custom-appearance):not(.link-button), | |
| 27 input[type='submit']:not(.custom-appearance):not(.link-button) { | |
| 28 -webkit-padding-end: 10px; | |
| 29 -webkit-padding-start: 10px; | |
| 30 background-image: | |
| 31 -webkit-gradient(linear, left top, left bottom, | |
| 32 color-stop(0, rgb(237, 237, 237)), | |
| 33 color-stop(0.38, rgb(237, 237, 237)), | |
| 34 color-stop(1, rgb(222, 222, 222))); | |
| 35 } | |
| 36 | |
| 37 select { | |
| 38 -webkit-appearance: none; | |
| 39 -webkit-padding-end: 20px; | |
| 40 -webkit-padding-start: 6px; | |
| 41 background-image: url('../images/select.png'), | |
| 42 -webkit-gradient(linear, left top, left bottom, | |
| 43 color-stop(0, rgb(237, 237, 237)), | |
| 44 color-stop(0.38, rgb(237, 237, 237)), | |
| 45 color-stop(1, rgb(222, 222, 222))); | |
| 46 background-position: right center; | |
| 47 background-repeat: no-repeat; | |
| 48 overflow: hidden; | |
| 49 text-align: left; | |
| 50 text-overflow: ellipsis; | |
| 51 white-space: nowrap; | |
| 52 } | |
| 53 | |
| 54 html[dir='rtl'] select { | |
| 55 background-position: center left; | |
| 56 } | |
| 57 | |
| 58 /* Hover **********************************************************************/ | |
| 59 | |
| 60 button:not(.custom-appearance):not(.link-button):enabled:hover, | |
| 61 input[type='button']:not(.custom-appearance):not(.link-button):enabled:hover, | |
| 62 input[type='submit']:not(.custom-appearance):not(.link-button):enabled:hover { | |
| 63 background-image: -webkit-gradient(linear, left top, left bottom, | |
| 64 color-stop(0, rgb(240, 240, 240)), | |
| 65 color-stop(0.38, rgb(240, 240, 240)), | |
| 66 color-stop(1, rgb(224, 224, 224))); | |
| 67 } | |
| 68 | |
| 69 select:enabled:hover { | |
| 70 background-image: url('../images/select.png'), | |
| 71 -webkit-gradient(linear, left top, left bottom, | |
| 72 color-stop(0, rgb(237, 237, 237)), | |
| 73 color-stop(0.38, rgb(237, 237, 237)), | |
| 74 color-stop(1, rgb(222, 222, 222))); | |
| 75 } | |
| 76 | |
| 77 button:not(.custom-appearance):not(.link-button):enabled:hover, | |
| 78 input[type='button']:not(.custom-appearance):not(.link-button):enabled:hover, | |
| 79 input[type='submit']:not(.custom-appearance):not(.link-button):enabled:hover, | |
| 80 select:enabled:hover { | |
| 81 border-color: rgba(0, 0, 0, 0.3); | |
| 82 box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12), | |
| 83 inset 0 1px 2px rgba(255, 255, 255, 0.95); | |
| 84 color: black; | |
| 85 } | |
| 86 | |
| 87 /* Active *********************************************************************/ | |
| 88 | |
| 89 button:not(.custom-appearance):not(.link-button):enabled:active, | |
| 90 input[type='button']:not(.custom-appearance):not(.link-button):enabled:active, | |
| 91 input[type='submit']:not(.custom-appearance):not(.link-button):enabled:active { | |
| 92 background-image: -webkit-gradient(linear, left top, left bottom, | |
| 93 color-stop(0, rgb(231, 231, 231)), | |
| 94 color-stop(0.38, rgb(231, 231, 231)), | |
| 95 color-stop(1, rgb(215, 215, 215))); | |
| 96 } | |
| 97 | |
| 98 select:enabled:active { | |
| 99 background-image: url('../images/select.png'), | |
| 100 -webkit-gradient(linear, left top, left bottom, | |
| 101 color-stop(0, rgb(231, 231, 231)), | |
| 102 color-stop(0.38, rgb(231, 231, 231)), | |
| 103 color-stop(1, rgb(215, 215, 215))); | |
| 104 } | |
| 105 | |
| 106 button:not(.custom-appearance):not(.link-button):enabled:active, | |
| 107 input[type='button']:not(.custom-appearance):not(.link-button):enabled:active, | |
| 108 input[type='submit']:not(.custom-appearance):not(.link-button):enabled:active, | |
| 109 select:enabled:active { | |
| 110 box-shadow: none; | |
| 111 text-shadow: none; | |
| 112 } | |
| 113 | |
| 114 /* Disabled *******************************************************************/ | |
| 115 | |
| 116 button:not(.custom-appearance):not(.link-button):disabled, | |
| 117 input[type='button']:not(.custom-appearance):not(.link-button):disabled, | |
| 118 input[type='submit']:not(.custom-appearance):not(.link-button):disabled, | |
| 119 select:disabled { | |
| 120 border-color: rgba(0, 0, 0, 0.2); | |
| 121 color: #999; | |
| 122 } | |
| 123 | |
| 124 select:disabled { | |
| 125 background-image: url('../images/disabled_select.png'), | |
| 126 -webkit-gradient(linear, left top, left bottom, | |
| 127 color-stop(0, rgb(237, 237, 237)), | |
| 128 color-stop(0.38, rgb(237, 237, 237)), | |
| 129 color-stop(1, rgb(222, 222, 222))); | |
| 130 } | |
| 131 | |
| 132 /* Focus **********************************************************************/ | |
| 133 | |
| 134 button:not(.custom-appearance):not(.link-button):focus, | |
| 135 input[type='submit']:not(.custom-appearance):focus, | |
| 136 input[type='text']:not(.custom-appearance):focus, | |
| 137 select:focus { | |
| 138 -webkit-transition: border-color 200ms; | |
| 139 /* We use border color because it follows the border radius (unlike outline). | |
| 140 * This is particularly noticeable on mac. */ | |
| 141 border-color: rgb(77, 144, 254); | |
| 142 outline: none; | |
| 143 } | |
| 144 | |
| 145 /* Search boxes use an outline because it follows the contours of the box. */ | |
| 146 input[type='search']:not(.custom-appearance):focus { | |
| 147 outline-color: rgb(77, 144, 254); | |
| 148 } | |
| 149 | |
| 150 /* Link buttons ***************************************************************/ | |
| 151 | |
| 152 .link-button { | |
| 153 -webkit-box-shadow: none; | |
| 154 background: transparent none; | |
| 155 border: none; | |
| 156 color: rgb(17, 85, 204); | |
| 157 cursor: pointer; | |
| 158 /* Input elements have -webkit-small-control which can override the body font. | |
| 159 * Resolve this by using 'inherit'. */ | |
| 160 font: inherit; | |
| 161 margin: 0; | |
| 162 padding: 0 4px; | |
| 163 } | |
| 164 | |
| 165 .link-button:hover { | |
| 166 text-decoration: underline; | |
| 167 } | |
| 168 | |
| 169 .link-button:active { | |
| 170 color: rgb(5, 37, 119); | |
| 171 text-decoration: underline; | |
| 172 } | |
| 173 | |
| 174 .link-button[disabled] { | |
| 175 color: #888; | |
| 176 cursor: default; | |
| 177 text-decoration: none; | |
| 178 } | |
| OLD | NEW |