button.pcss.css

Same filename in this branch
  1. 10 core/themes/olivero/css/components/button.pcss.css
  2. 10 core/themes/claro/css/components/button.pcss.css
Same filename in other branches
  1. 9 core/themes/olivero/css/components/button.pcss.css
  2. 9 core/themes/claro/css/components/button.pcss.css
  3. 8.9.x core/themes/claro/css/components/button.pcss.css
  4. 11.x core/misc/dialog/off-canvas/css/button.pcss.css
  5. 11.x core/themes/olivero/css/components/button.pcss.css
  6. 11.x core/themes/claro/css/components/button.pcss.css

Visual styling for buttons in the off-canvas dialog.

@internal

File

core/misc/dialog/off-canvas/css/button.pcss.css

View source
  1. /**
  2. * @file
  3. * Visual styling for buttons in the off-canvas dialog.
  4. *
  5. * @internal
  6. */
  7. #drupal-off-canvas-wrapper {
  8. --off-canvas-button-background-color: #777;
  9. --off-canvas-button-background-color-hover: #999;
  10. --off-canvas-button-text-color: #f5f5f5;
  11. --off-canvas-button-text-color-hover: #fff;
  12. --off-canvas-button-font-size: 14px;
  13. --off-canvas-button-padding: calc(var(--off-canvas-vertical-spacing-unit) / 2) 20px;
  14. --off-canvas-button-border-color: transparent;
  15. --off-canvas-button-border-radius: 20em;
  16. --off-canvas-button-font-weight: 600;
  17. --off-canvas-primary-button-background-color: #277abd;
  18. --off-canvas-primary-button-background-color-hover: #236aaf;
  19. --off-canvas-primary-button-text-color: #fff;
  20. --off-canvas-primary-button-text-color-hover: #fff;
  21. & .button {
  22. display: inline-block;
  23. height: auto;
  24. margin: 0 0 10px;
  25. padding: var(--off-canvas-button-padding);
  26. cursor: pointer;
  27. transition: background 0.5s ease;
  28. text-align: center;
  29. color: var(--off-canvas-button-text-color);
  30. border: solid 1px var(--off-canvas-button-border-color);
  31. border-radius: var(--off-canvas-button-border-radius);
  32. background: var(--off-canvas-button-background-color);
  33. font-family: inherit;
  34. font-size: var(--off-canvas-button-font-size);
  35. font-weight: var(--off-canvas-button-font-weight);
  36. line-height: normal;
  37. appearance: none;
  38. &:hover,
  39. &:active {
  40. z-index: 10;
  41. text-decoration: none;
  42. color: var(--off-canvas-button-text-color-hover);
  43. background-color: var(--off-canvas-button-background-color-hover);
  44. }
  45. &:disabled,
  46. &:disabled:active,
  47. &.is-disabled,
  48. &.is-disabled:active {
  49. cursor: default;
  50. color: #5c5c5c;
  51. background: #555;
  52. font-weight: normal;
  53. }
  54. }
  55. & .button--primary {
  56. margin-top: 15px;
  57. color: var(--off-canvas-primary-button-text-color);
  58. background: var(--off-canvas-primary-button-background-color);
  59. &:hover,
  60. &:active {
  61. color: var(--off-canvas-primary-button-text-color-hover);
  62. background: var(--off-canvas-primary-button-background-color-hover);
  63. }
  64. }
  65. & button.link {
  66. display: inline;
  67. transition: color 0.5s ease;
  68. color: var(--off-canvas-link-color);
  69. border: 0;
  70. background: transparent;
  71. font-size: var(--off-canvas-button-font-size);
  72. &:hover,
  73. &:focus {
  74. text-decoration: none;
  75. color: var(--off-canvas-link-color);
  76. }
  77. }
  78. & .button--danger {
  79. text-decoration: none;
  80. color: #c72100;
  81. border-radius: 0;
  82. font-weight: 400;
  83. &:hover,
  84. &:focus,
  85. &:active {
  86. text-decoration: none;
  87. color: #ff2a00;
  88. text-shadow: none;
  89. }
  90. &:disabled,
  91. &.is-disabled {
  92. cursor: default;
  93. color: #737373;
  94. }
  95. }
  96. @nest .no-touchevents & .button--small {
  97. padding: 2px 1em;
  98. font-size: 13px;
  99. }
  100. }

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.