imagelessbutton.css 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. /*
  2. * Copyright 2008 The Closure Library Authors. All Rights Reserved.
  3. *
  4. * Use of this source code is governed by the Apache License, Version 2.0.
  5. * See the COPYING file for details.
  6. */
  7. /*
  8. * Styling for buttons created by goog.ui.ImagelessButtonRenderer.
  9. *
  10. * WARNING: This file uses some ineffecient selectors and it may be
  11. * best to avoid using this file in extremely large, or performance
  12. * critical applications.
  13. *
  14. * @author: eae@google.com (Emil A Eklund)
  15. * @author: gboyer@google.com (Garrett Boyer)
  16. */
  17. /* Imageless button styles. */
  18. /* The base element of the button. */
  19. .goog-imageless-button {
  20. /* Set the background color at the outermost level. */
  21. background: #e3e3e3;
  22. /* Place a top and bottom border. Do it on this outermost div so that
  23. * it is easier to make pill buttons work properly. */
  24. border-color: #bbb;
  25. border-style: solid;
  26. border-width: 1px 0;
  27. color: #222; /* Text content color. */
  28. cursor: default;
  29. font-family: Arial, sans-serif;
  30. line-height: 0; /* For Opera and old WebKit. */
  31. list-style: none;
  32. /* Built-in margin for the component. Because of the negative margins
  33. * used to simulate corner rounding, the effective left and right margin is
  34. * actually only 1px. */
  35. margin: 2px;
  36. outline: none;
  37. padding: 0;
  38. text-decoration: none;
  39. vertical-align: middle;
  40. }
  41. /*
  42. * Pseudo-rounded corners. Works by pulling the left and right sides slightly
  43. * outside of the parent bounding box before drawing the left and right
  44. * borders.
  45. */
  46. .goog-imageless-button-outer-box {
  47. /* Left and right border that protrude outside the parent. */
  48. border-color: #bbb;
  49. border-style: solid;
  50. border-width: 0 1px;
  51. /* Same as margin: 0 -1px, except works better cross browser. These are
  52. * intended to be RTL flipped to work better in IE7. */
  53. left: -1px;
  54. margin-right: -2px;
  55. }
  56. /*
  57. * A div to give the light and medium shades of the button that takes up no
  58. * vertical space.
  59. */
  60. .goog-imageless-button-top-shadow {
  61. /* Light top color in the content. */
  62. background: #f9f9f9;
  63. /* Thin medium shade. */
  64. border-bottom: 3px solid #eee;
  65. /* Control height with line-height, since height: will trigger hasLayout.
  66. * Specified in pixels, as a compromise to avoid rounding errors. */
  67. line-height: 9px;
  68. /* Undo all space this takes up. */
  69. margin-bottom: -12px;
  70. }
  71. /* Actual content area for the button. */
  72. .goog-imageless-button-content {
  73. line-height: 1.5em;
  74. padding: 0px 4px;
  75. text-align: center;
  76. }
  77. /* Pill (collapsed border) styles. */
  78. .goog-imageless-button-collapse-right {
  79. /* Draw a border on the root element to square the button off. The border
  80. * on the outer-box element remains, but gets obscured by the next button. */
  81. border-right-width: 1px;
  82. margin-right: -2px; /* Undoes the margins between the two buttons. */
  83. }
  84. .goog-imageless-button-collapse-left .goog-imageless-button-outer-box {
  85. /* Don't bleed to the left -- keep the border self contained in the box. */
  86. border-left-color: #eee;
  87. left: 0;
  88. margin-right: -1px; /* Versus the default of -2px. */
  89. }
  90. /* Disabled styles. */
  91. .goog-imageless-button-disabled,
  92. .goog-imageless-button-disabled .goog-imageless-button-outer-box {
  93. background: #eee;
  94. border-color: #ccc;
  95. color: #666; /* For text */
  96. }
  97. .goog-imageless-button-disabled .goog-imageless-button-top-shadow {
  98. /* Just hide the shadow instead of setting individual colors. */
  99. visibility: hidden;
  100. }
  101. /*
  102. * Active and checked styles.
  103. * Identical except for text color according to GUIG.
  104. */
  105. .goog-imageless-button-active, .goog-imageless-button-checked {
  106. background: #f9f9f9;
  107. }
  108. .goog-imageless-button-active .goog-imageless-button-top-shadow,
  109. .goog-imageless-button-checked .goog-imageless-button-top-shadow {
  110. background: #e3e3e3;
  111. }
  112. .goog-imageless-button-active {
  113. color: #000;
  114. }
  115. /* Hover styles. Higher priority to override other border styles. */
  116. .goog-imageless-button-hover,
  117. .goog-imageless-button-hover .goog-imageless-button-outer-box,
  118. .goog-imageless-button-focused,
  119. .goog-imageless-button-focused .goog-imageless-button-outer-box {
  120. border-color: #000;
  121. }
  122. /* IE6 hacks. This is the only place inner-box is used. */
  123. * html .goog-imageless-button-inner-box {
  124. /* Give the element inline-block behavior so that the shadow appears.
  125. * The main requirement is to give the element layout without having the side
  126. * effect of taking up a full line. */
  127. display: inline;
  128. /* Allow the shadow to show through, overriding position:relative from the
  129. * goog-inline-block styles. */
  130. position: static;
  131. zoom: 1;
  132. }
  133. * html .goog-imageless-button-outer-box {
  134. /* In RTL mode, IE is off by one pixel. To fix, override the left: -1px
  135. * (which was flipped to right) without having any effect on LTR mode
  136. * (where IE ignores right when left is specified). */
  137. /* @noflip */ right: 0;
  138. }