You are here

button.css in Drupal 9

Buttons.

File

core/themes/olivero/css/components/button.css
View source
  1. /*
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/3084859
  5. * @preserve
  6. */
  7. /**
  8. * @file
  9. * Buttons.
  10. */
  11. [dir="ltr"] .button {
  12. margin-left: 0
  13. }
  14. [dir="rtl"] .button {
  15. margin-right: 0
  16. }
  17. [dir="ltr"] .button {
  18. margin-right: 1.125rem
  19. }
  20. [dir="rtl"] .button {
  21. margin-left: 1.125rem
  22. }
  23. .button {
  24. display: inline-block;
  25. height: 3.375rem;
  26. margin-top: 1.125rem;
  27. margin-bottom: 1.125rem;
  28. padding-top: 1.125rem;
  29. padding-bottom: 1.125rem;
  30. padding-left: 1.6875rem;
  31. padding-right: 1.6875rem;
  32. cursor: pointer;
  33. text-align: center;
  34. text-decoration: none;
  35. color: #0d77b5;
  36. border: solid 2px #0d77b5;
  37. border-radius: 0.1875rem;
  38. background-color: #fff;
  39. font-family: inherit;
  40. font-size: 1.125rem;
  41. font-weight: 700;
  42. -webkit-appearance: none;
  43. -moz-appearance: none;
  44. appearance: none;
  45. -webkit-font-smoothing: antialiased
  46. }
  47. .button:hover,
  48. .button:focus {
  49. text-decoration: none;
  50. color: #2494db;
  51. border-color: #2494db;
  52. }
  53. .button:focus {
  54. outline: 2px solid #53b0eb;
  55. outline-offset: 2px;
  56. }
  57. .button:active {
  58. color: #0d77b5;
  59. border-color: #0d77b5;
  60. }
  61. .button:disabled,
  62. .button.is-disabled {
  63. cursor: default;
  64. color: #d7e1e8;
  65. border-color: #d7e1e8;
  66. }
  67. .button {
  68. /*
  69. IE11 doesn't work properly on button elements so we only do
  70. inline-flex on modern browsers.
  71. */
  72. }
  73. @supports (display: inline-flex) {
  74. .button {
  75. display: inline-flex;
  76. align-items: center;
  77. /* Top padding accounts for font not being vertically centered within line-height. */
  78. padding-top: 1px;
  79. padding-bottom: 0;
  80. padding-left: 1.6875rem;
  81. padding-right: 1.6875rem;
  82. line-height: 1.125rem
  83. }
  84. }
  85. /* No margin if is part of a menu. */
  86. [dir="ltr"] .menu .button {
  87. margin-left: 0
  88. }
  89. [dir="rtl"] .menu .button {
  90. margin-right: 0
  91. }
  92. [dir="ltr"] .menu .button {
  93. margin-right: 0
  94. }
  95. [dir="rtl"] .menu .button {
  96. margin-left: 0
  97. }
  98. .menu .button {
  99. margin-top: 0;
  100. margin-bottom: 0;
  101. }
  102. .button--small {
  103. height: 2.8125rem;
  104. padding-top: 0.84375rem;
  105. padding-bottom: 0.84375rem;
  106. padding-left: 1.125rem;
  107. padding-right: 1.125rem;
  108. font-size: 1rem;
  109. line-height: normal;
  110. }
  111. .button--primary {
  112. color: #fff;
  113. background-color: #0d77b5
  114. }
  115. .button--primary:hover,
  116. .button--primary:focus {
  117. color: #fff;
  118. border-color: #0f6292;
  119. background-color: #0f6292;
  120. }
  121. .button--primary:active {
  122. color: #fff;
  123. background-color: #0d77b5;
  124. }
  125. .button--primary:disabled,
  126. .button--primary.is-disabled {
  127. color: #fff;
  128. background-color: #d7e1e8;
  129. }
  130. .button--icon-back {
  131. display: inline-flex;
  132. align-items: center
  133. }
  134. [dir="ltr"] .button--icon-back:before {
  135. margin-right: 0.5em
  136. }
  137. [dir="rtl"] .button--icon-back:before {
  138. margin-left: 0.5em
  139. }
  140. [dir="ltr"] .button--icon-back:before {
  141. border-left: solid 2px currentColor
  142. }
  143. [dir="rtl"] .button--icon-back:before {
  144. border-right: solid 2px currentColor
  145. }
  146. .button--icon-back:before {
  147. display: block;
  148. width: 0.5em;
  149. height: 0.5em;
  150. content: "";
  151. transform: rotate(45deg); /* LTR */
  152. border-bottom: solid 2px currentColor;
  153. }
  154. [dir="rtl"] .button--icon-back:before {
  155. transform: rotate(-45deg);
  156. }