Chromium Code Reviews| Index: chrome/browser/resources/shared/css/button.css |
| diff --git a/chrome/browser/resources/shared/css/button.css b/chrome/browser/resources/shared/css/button.css |
| index b062d8ca066716e426d93bf451ca63a6c6c4b7f5..4cd3e1dfd21692689ccfc36a62a5a0e5f74157b0 100644 |
| --- a/chrome/browser/resources/shared/css/button.css |
| +++ b/chrome/browser/resources/shared/css/button.css |
| @@ -3,76 +3,152 @@ |
| * found in the LICENSE file. |
| */ |
| +/* Default state **************************************************************/ |
| + |
| button:not(.custom-appearance):not(.link-button), |
| input[type='button']:not(.custom-appearance):not(.link-button), |
| -input[type='submit']:not(.custom-appearance):not(.link-button) { |
| - -webkit-border-radius: 3px; |
| - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); |
| +input[type='submit']:not(.custom-appearance):not(.link-button), |
| +select { |
|
Dan Beam
2012/03/02 17:58:43
there's no .custom-appearance for selects?
Evan Stade
2012/03/02 19:46:20
no. I suppose there could be but we haven't had a
|
| -webkit-user-select: none; |
| - background: -webkit-linear-gradient(#fafafa, #f4f4f4 40%, #e5e5e5); |
| - border: 1px solid #aaa; |
| + border-radius: 2px; |
|
Dan Beam
2012/03/02 17:58:43
so this intentionally changes the border-radius fr
Evan Stade
2012/03/02 19:46:20
yes
|
| + border: 1px solid rgba(0, 0, 0, 0.25); |
| + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), |
| + inset 0 1px 2px rgba(255, 255, 255, 0.75); |
| color: #444; |
| - /* Input elements have -webkit-small-control which can override the body font. |
| - * Resolve this by using 'inherit'. */ |
| - font-family: inherit; |
| - font-size: inherit; |
| - margin-bottom: 0; |
| - margin-top: 0; |
| + font: inherit; |
|
Dan Beam
2012/03/02 17:58:43
this also inherits line-height, font-weight, font-
Evan Stade
2012/03/02 19:46:20
yea. I don't think any of those will be a problem.
|
| + height: 2em; |
|
Dan Beam
2012/03/02 17:58:43
where did this come from?
Evan Stade
2012/03/02 19:46:20
in the mocks it was height: 24px. I changed it to
Dan Beam
2012/03/02 20:24:42
ok, and I take it that's the same computed value,
Evan Stade
2012/03/02 21:47:02
bingo
|
| + margin: 0 1px 0 0; |
| min-width: 4em; |
| - padding: 3px 12px; |
| + text-shadow: 0 1px 0 rgb(240, 240, 240); |
| +} |
| + |
| +button:not(.custom-appearance):not(.link-button), |
| +input[type='button']:not(.custom-appearance):not(.link-button), |
| +input[type='submit']:not(.custom-appearance):not(.link-button) { |
| + -webkit-padding-end: 10px; |
| + -webkit-padding-start: 10px; |
| + background-image: |
| + -webkit-gradient(linear, left top, left bottom, |
| + color-stop(0, rgb(237, 237, 237)), |
| + color-stop(0.38, rgb(237, 237, 237)), |
| + color-stop(1, rgb(222, 222, 222))); |
| } |
| -button:not(.custom-appearance):not(.link-button):hover, |
| -input[type='button']:not(.custom-appearance):not(.link-button):hover, |
| -input[type='submit']:not(.custom-appearance):not(.link-button):hover { |
| - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); |
| - background: #ebebeb -webkit-linear-gradient(#fefefe, #f8f8f8 40%, #e9e9e9); |
| - border-color: #999; |
| - color: #222; |
| +select { |
| + -webkit-appearance: none; |
| + -webkit-padding-end: 20px; |
| + -webkit-padding-start: 6px; |
| + background-image: url("../images/select.png"), |
|
Dan Beam
2012/03/02 17:58:43
single quotes
Evan Stade
2012/03/02 19:46:20
Done.
|
| + -webkit-gradient(linear, left top, left bottom, |
| + color-stop(0, rgb(237, 237, 237)), |
| + color-stop(0.38, rgb(237, 237, 237)), |
| + color-stop(1, rgb(222, 222, 222))); |
| + background-position: right center; |
| + background-repeat: no-repeat; |
| + overflow: hidden; |
| + text-align: left; |
| + text-overflow: ellipsis; |
| + white-space: nowrap; |
| } |
| -button:not(.custom-appearance):not(.link-button):active, |
| -input[type='button']:not(.custom-appearance):not(.link-button):active, |
| -input[type='submit']:not(.custom-appearance):not(.link-button):active { |
| - -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2); |
| - background: #ebebeb -webkit-linear-gradient(#f4f4f4, #efefef 40%, #dcdcdc); |
| - color: #333; |
| +html[dir='rtl'] select { |
| + background-position: center left; |
| } |
| -button[disabled]:not(.custom-appearance):not(.link-button), |
| -input[type='button'][disabled]:not(.custom-appearance):not(.link-button), |
| -input[type='submit'][disabled]:not(.custom-appearance):not(.link-button), |
| -button[disabled]:not(.custom-appearance):not(.link-button):hover, |
| -input[type='button'][disabled]:not(.custom-appearance):not(.link-button):hover, |
| -input[type='submit'][disabled]:not(.custom-appearance):not(.link-button):hover { |
| - -webkit-box-shadow: none; |
| - background: -webkit-linear-gradient(#fafafa, #f4f4f4 40%, #e5e5e5); |
| - border-color: #aaa; |
| - color: #888; |
| +/* Hover **********************************************************************/ |
| + |
| +button:not(.custom-appearance):not(.link-button):enabled:hover, |
| +input[type='button']:not(.custom-appearance):not(.link-button):enabled:hover, |
| +input[type='submit']:not(.custom-appearance):not(.link-button):enabled:hover { |
| + background-image: -webkit-gradient(linear, left top, left bottom, |
| + color-stop(0, rgb(240, 240, 240)), |
| + color-stop(0.38, rgb(240, 240, 240)), |
| + color-stop(1, rgb(224, 224, 224))); |
| +} |
| + |
| +select:enabled:hover { |
| + background-image: url("../images/select.png"), |
|
Dan Beam
2012/03/02 17:58:43
single quotes
Evan Stade
2012/03/02 19:46:20
Done.
|
| + -webkit-gradient(linear, left top, left bottom, |
| + color-stop(0, rgb(237, 237, 237)), |
| + color-stop(0.38, rgb(237, 237, 237)), |
| + color-stop(1, rgb(222, 222, 222))); |
| } |
| -/* TODO(estade): remove this. It's duplicated in chrome_shared2.css */ |
| +button:not(.custom-appearance):not(.link-button):enabled:hover, |
| +input[type='button']:not(.custom-appearance):not(.link-button):enabled:hover, |
| +input[type='submit']:not(.custom-appearance):not(.link-button):enabled:hover, |
| +select:enabled:hover { |
| + border-color: rgba(0, 0, 0, 0.3); |
| + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12), |
| + inset 0 1px 2px rgba(255, 255, 255, 0.95); |
| + color: black; |
| +} |
| + |
| +/* Active *********************************************************************/ |
| + |
| +button:not(.custom-appearance):not(.link-button):enabled:active, |
| +input[type='button']:not(.custom-appearance):not(.link-button):enabled:active, |
| +input[type='submit']:not(.custom-appearance):not(.link-button):enabled:active { |
| + background-image: -webkit-gradient(linear, left top, left bottom, |
| + color-stop(0, rgb(231, 231, 231)), |
| + color-stop(0.38, rgb(231, 231, 231)), |
| + color-stop(1, rgb(215, 215, 215))); |
| +} |
| + |
| +select:enabled:active { |
| + background-image: url("../images/select.png"), |
|
Dan Beam
2012/03/02 17:58:43
here too
Evan Stade
2012/03/02 19:46:20
Done.
|
| + -webkit-gradient(linear, left top, left bottom, |
| + color-stop(0, rgb(231, 231, 231)), |
| + color-stop(0.38, rgb(231, 231, 231)), |
| + color-stop(1, rgb(215, 215, 215))); |
| +} |
| + |
| +button:not(.custom-appearance):not(.link-button):enabled:active, |
| +input[type='button']:not(.custom-appearance):not(.link-button):enabled:active, |
| +input[type='submit']:not(.custom-appearance):not(.link-button):enabled:active, |
| +select:enabled:active { |
| + box-shadow: none; |
| + text-shadow: none; |
| +} |
| + |
| +/* Disabled *******************************************************************/ |
| + |
| +button:not(.custom-appearance):not(.link-button):disabled, |
| +input[type='button']:not(.custom-appearance):not(.link-button):disabled, |
| +input[type='submit']:not(.custom-appearance):not(.link-button):disabled, |
| +select:disabled { |
| + border-color: rgba(0, 0, 0, 0.2); |
| + color: #999; |
| +} |
| + |
| +select:disabled { |
| + background-image: url("../images/disabled_select.png"), |
|
Dan Beam
2012/03/02 17:58:43
here too
Evan Stade
2012/03/02 19:46:20
Done.
|
| + -webkit-gradient(linear, left top, left bottom, |
| + color-stop(0, rgb(237, 237, 237)), |
| + color-stop(0.38, rgb(237, 237, 237)), |
| + color-stop(1, rgb(222, 222, 222))); |
| +} |
| + |
| +/* Focus **********************************************************************/ |
| + |
| button:not(.custom-appearance):not(.link-button):focus, |
| -input[type='submit']:not(.custom-appearance):not(.link-button):focus, |
| -input[type='text']:not(.custom-appearance):not(.link-button):focus, |
| -select:not(.custom-appearance):not(.link-button):focus { |
| - -webkit-box-shadow: inset 0 1px 2px white, |
| - 0 1px 2px rgba(0, 0, 0, .2), |
| - 0 0 1px #c0c0c0, |
| - 0 0 1px #c0c0c0, |
| - 0 0 1px #c0c0c0; |
| +input[type='submit']:not(.custom-appearance):focus, |
| +input[type='text']:not(.custom-appearance):focus, |
| +select:focus { |
| -webkit-transition: border-color 200ms; |
| /* We use border color because it follows the border radius (unlike outline). |
| * This is particularly noticeable on mac. */ |
| - border-color: rgb(64, 128, 250); |
| + border-color: rgb(77, 144, 254); |
| outline: none; |
| } |
| /* Search boxes use an outline because it follows the contours of the box. */ |
| -input[type='search']:not(.custom-appearance):not(.link-button):focus { |
| - outline-color: rgb(64, 128, 250); |
| +input[type='search']:not(.custom-appearance):focus { |
| + outline-color: rgb(77, 144, 254); |
| } |
| +/* Link buttons ***************************************************************/ |
| + |
| .link-button { |
| -webkit-box-shadow: none; |
| background: transparent none; |