Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* Copyright (c) 2011 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 * Css based bubble. | 5 * Css based bubble. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 .bubble { | 8 .bubble { |
| 9 -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.2); | 9 -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.2); |
| 10 background: white; | 10 background: white; |
| 11 border: 1px solid rgba(0, 0, 0, 0.25); | 11 border: 1px solid rgba(0, 0, 0, 0.25); |
| 12 border-radius: 10px; | 12 border-radius: 10px; |
| 13 margin: 10px 2px 2px 2px; | 13 margin: 2px; |
| 14 padding: 10px; | 14 padding: 10px; |
| 15 position: absolute; | 15 position: absolute; |
| 16 max-width: 250px; | 16 max-width: 250px; |
| 17 } | 17 } |
| 18 | 18 |
| 19 .bubble-top { | |
| 20 margin-bottom: 10px; | |
| 21 } | |
| 22 .bubble-right | |
|
xiyuan
2012/02/02 22:43:52
nit: insert a blank line between css groups and al
Ivan Korotkov
2012/02/03 10:33:04
Done.
| |
| 23 html[dir=rtl] .bubble-left { | |
| 24 margin-left: 10px; | |
| 25 } | |
| 26 .bubble-bottom { | |
| 27 margin-top: 10px; | |
| 28 } | |
| 29 .bubble-left, | |
| 30 html[dir=rtl] .bubble-right { | |
| 31 margin-right: 10px; | |
| 32 } | |
| 33 | |
| 19 .bubble:before { | 34 .bubble:before { |
| 20 content: ""; | 35 content: ""; |
| 21 border-color: transparent transparent rgba(0, 0, 0, 0.25) transparent; | |
| 22 border-style: solid; | 36 border-style: solid; |
| 23 border-width: 8px; | 37 border-width: 8px; |
| 24 display: block; | 38 display: block; |
| 39 position: absolute; | |
| 40 } | |
| 41 | |
| 42 .bubble-top:before { | |
| 43 border-color: rgba(0, 0, 0, 0.25) transparent transparent transparent; | |
| 44 bottom: -16px; | |
| 25 left: 10px; | 45 left: 10px; |
| 26 position: absolute; | 46 } |
| 47 .bubble-right:before, | |
| 48 html[dir=rtl] .bubble-left:before { | |
| 49 border-color: transparent rgba(0, 0, 0, 0.25) transparent transparent; | |
| 50 left: -16px; | |
| 51 top: 10px; | |
| 52 } | |
| 53 .bubble-bottom:before { | |
| 54 border-color: transparent transparent rgba(0, 0, 0, 0.25) transparent; | |
| 55 left: 10px; | |
| 27 top: -16px; | 56 top: -16px; |
| 28 } | 57 } |
| 58 .bubble-left:before, | |
| 59 html[dir=rtl] .bubble-right:before { | |
| 60 border-color: transparent transparent transparent rgba(0, 0, 0, 0.25); | |
| 61 right: -16px; | |
| 62 top: 10px; | |
| 63 } | |
| 29 | 64 |
| 30 .bubble:after { | 65 .bubble:after { |
| 31 content: ""; | 66 content: ""; |
| 32 border-color: transparent transparent white transparent; | |
| 33 border-style: solid; | 67 border-style: solid; |
| 34 border-width: 8px; | 68 border-width: 8px; |
| 35 display: block; | 69 display: block; |
| 70 position: absolute; | |
| 71 } | |
| 72 | |
| 73 .bubble-top:after { | |
| 74 border-color: white transparent transparent transparent; | |
| 75 bottom: -15px; | |
| 36 left: 10px; | 76 left: 10px; |
| 37 position: absolute; | 77 } |
| 78 .bubble-right:after, | |
| 79 html[dir=rtl] .bubble-left:after { | |
| 80 border-color: transparent white transparent transparent; | |
| 81 left: -15px; | |
| 82 top: 10px; | |
| 83 } | |
| 84 .bubble-bottom:after { | |
| 85 border-color: transparent transparent white transparent; | |
| 86 left: 10px; | |
| 38 top: -15px; | 87 top: -15px; |
| 39 } | 88 } |
| 89 .bubble-left:after, | |
| 90 html[dir=rtl] .bubble-right:after { | |
| 91 border-color: transparent transparent transparent white; | |
| 92 right: -15px; | |
| 93 top: 10px; | |
| 94 } | |
| OLD | NEW |