You are here

button.css in Drupal 10

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. /*
  12. * Media query breakpoints.
  13. * Processed by postcss/postcss-custom-media.
  14. */
  15. /* Navigation related breakpoints */
  16. /* Grid related breakpoints */
  17. /* Grid shifts from 6 to 14 columns. */
  18. /* Width of the entire grid maxes out. */
  19. [dir="ltr"] .button {
  20. margin-left: 0
  21. }
  22. [dir="rtl"] .button {
  23. margin-right: 0
  24. }
  25. [dir="ltr"] .button {
  26. margin-right: var(--sp1)
  27. }
  28. [dir="rtl"] .button {
  29. margin-left: var(--sp1)
  30. }
  31. .button {
  32. display: inline-block;
  33. height: var(--sp3);
  34. margin-top: var(--sp1);
  35. margin-bottom: var(--sp1);
  36. padding-top: calc((var(--sp3) - var(--line-height-s)) / 2);
  37. padding-bottom: calc((var(--sp3) - var(--line-height-s)) / 2);
  38. padding-left: var(--sp1-5);
  39. padding-right: var(--sp1-5);
  40. cursor: pointer;
  41. text-align: center;
  42. text-decoration: none;
  43. color: var(--color-text-primary-medium);
  44. border: solid 2px currentColor;
  45. border-radius: var(--border-radius);
  46. background-color: var(--color--white);
  47. font-family: var(--font-sans);
  48. font-size: var(--font-size-l);
  49. font-weight: 700;
  50. -webkit-appearance: none;
  51. appearance: none;
  52. -webkit-font-smoothing: antialiased
  53. }
  54. .button:hover,
  55. .button:focus {
  56. text-decoration: none;
  57. color: var(--color-text-primary-loud);
  58. border: solid 2px currentColor;
  59. background: none;
  60. font-weight: 700;
  61. }
  62. .button:focus {
  63. outline: 2px solid var(--color--primary-60);
  64. outline-offset: 2px;
  65. }
  66. .button:active {
  67. color: var(--color-text-primary-medium);
  68. border-color: currentColor;
  69. }
  70. .button:disabled,
  71. .button.is-disabled {
  72. cursor: default;
  73. color: var(--color--gray-90);
  74. border-color: var(--color--gray-90);
  75. }
  76. .button {
  77. /*
  78. IE11 doesn't work properly on button elements so we only do
  79. inline-flex on modern browsers.
  80. */
  81. }
  82. @supports (display: inline-flex) {
  83. .button {
  84. display: inline-flex;
  85. align-items: center;
  86. /* Top padding accounts for font not being vertically centered within line-height. */
  87. padding-top: 1px;
  88. padding-bottom: 0;
  89. padding-left: var(--sp1-5);
  90. padding-right: var(--sp1-5);
  91. line-height: var(--line-height-s)
  92. }
  93. }
  94. /* No margin if is part of a menu. */
  95. [dir="ltr"] .menu .button {
  96. margin-left: 0
  97. }
  98. [dir="rtl"] .menu .button {
  99. margin-right: 0
  100. }
  101. [dir="ltr"] .menu .button {
  102. margin-right: 0
  103. }
  104. [dir="rtl"] .menu .button {
  105. margin-left: 0
  106. }
  107. .menu .button {
  108. margin-top: 0;
  109. margin-bottom: 0;
  110. }
  111. .button--small {
  112. height: var(--sp2-5);
  113. padding-top: calc((var(--sp2-5) - var(--line-height-s)) / 2);
  114. padding-bottom: calc((var(--sp2-5) - var(--line-height-s)) / 2);
  115. padding-left: var(--sp);
  116. padding-right: var(--sp);
  117. font-size: var(--font-size-base);
  118. line-height: normal;
  119. }
  120. .button--primary {
  121. color: var(--color--white);
  122. background-color: var(--color--primary-40)
  123. }
  124. .button--primary:hover,
  125. .button--primary:focus {
  126. color: var(--color--white);
  127. border-color: var(--color--primary-30);
  128. background-color: var(--color--primary-30);
  129. }
  130. .button--primary:active {
  131. color: var(--color--white);
  132. background-color: var(--color--primary-40);
  133. }
  134. .button--primary:disabled,
  135. .button--primary.is-disabled {
  136. color: var(--color--white);
  137. background-color: var(--color--gray-90);
  138. }
  139. .button--icon-back {
  140. display: inline-flex;
  141. align-items: center
  142. }
  143. [dir="ltr"] .button--icon-back:before {
  144. margin-right: 0.5em
  145. }
  146. [dir="rtl"] .button--icon-back:before {
  147. margin-left: 0.5em
  148. }
  149. [dir="ltr"] .button--icon-back:before {
  150. border-left: solid 2px currentColor
  151. }
  152. [dir="rtl"] .button--icon-back:before {
  153. border-right: solid 2px currentColor
  154. }
  155. .button--icon-back:before {
  156. display: block;
  157. width: 0.5em;
  158. height: 0.5em;
  159. content: "";
  160. transform: rotate(45deg); /* LTR */
  161. border-bottom: solid 2px currentColor;
  162. }
  163. [dir="rtl"] .button--icon-back:before {
  164. transform: rotate(-45deg);
  165. }
  166. .shepherd-cancel-icon {
  167. font-size: 1.5em;
  168. }