contextual-links.pcss.css

Same filename and directory in other branches
  1. 11.x core/themes/default_admin/css/components/contextual-links.pcss.css

Contextual links styles.

File

core/themes/default_admin/css/components/contextual-links.pcss.css

View source
  1. /**
  2. * @file
  3. * Contextual links styles.
  4. */
  5. .contextual {
  6. z-index: 100;
  7. box-sizing: border-box;
  8. *,
  9. *::before,
  10. *::after {
  11. box-sizing: border-box;
  12. }
  13. .trigger {
  14. overflow: clip;
  15. text-indent: -999px;
  16. border: 1px solid var(--admin-color-border-input);
  17. border-radius: 50%;
  18. background: var(--admin-color-bg-raised);
  19. box-shadow: 0 2px 4px rgb(0, 0, 0, 0.15);
  20. &,
  21. &.visually-hidden.focusable {
  22. width: 32px;
  23. height: 32px;
  24. }
  25. &::before {
  26. position: absolute;
  27. display: block;
  28. width: 0.75rem;
  29. height: 0.75rem;
  30. margin: auto;
  31. content: "";
  32. background: var(--admin-color-primary);
  33. inset: 0;
  34. mask-image: url("../../images/icons/currentColor/media-edit.svg");
  35. mask-size: var(--admin-space-s);
  36. mask-position: 100% 100%;
  37. }
  38. &:hover {
  39. box-shadow:
  40. 0 0 0 1px var(--admin-color-focus-border),
  41. 0 0 0 4px var(--admin-color-focus);
  42. }
  43. @media (forced-colors: active) {
  44. border-color: buttonText;
  45. background: buttonFace;
  46. box-shadow: none;
  47. &::before {
  48. background: buttonText;
  49. }
  50. &:hover,
  51. &:focus,
  52. &:focus-visible {
  53. border-color: highlight;
  54. outline: 2px solid highlight;
  55. outline-offset: 2px;
  56. background: highlight;
  57. &::before {
  58. background: highlightText;
  59. }
  60. }
  61. }
  62. }
  63. &.open .trigger {
  64. border-block-end: 0 none;
  65. border-radius: 50%;
  66. }
  67. }
  68. .contextual-region .contextual .contextual-links {
  69. min-width: 120px;
  70. margin: 0;
  71. padding: 0.5em;
  72. border: 1px solid transparent;
  73. border-radius: var(--admin-radius-l);
  74. background: var(--admin-color-bg-raised);
  75. box-shadow: var(--admin-shadow-2);
  76. inset-block-start: var(--admin-space-2xs);
  77. li {
  78. background: transparent;
  79. a {
  80. margin: 0;
  81. padding: var(--admin-space-xs) var(--admin-space-m);
  82. white-space: nowrap;
  83. color: var(--admin-color-primary);
  84. border-radius: var(--admin-radius-s);
  85. background: transparent;
  86. font-family: var(--admin-font-family);
  87. line-height: 1;
  88. &:hover,
  89. &:active {
  90. color: var(--admin-color-text-on-primary);
  91. background: var(--admin-color-primary);
  92. @media (forced-colors: active) {
  93. text-decoration: underline;
  94. }
  95. }
  96. .no-touchevents
  97. }
  98. }
  99. }
  100. .ajax-progress-throbber {
  101. border-radius: 50%;
  102. background: var(--admin-color-primary);
  103. inset-block-start: 0.125rem;
  104. &::before {
  105. position: absolute;
  106. display: block;
  107. width: 1.125rem;
  108. height: 1.125rem;
  109. content: "";
  110. animation: throbber 0.75s linear infinite;
  111. border: 2px solid var(--admin-color-primary);
  112. border-inline-end: 2px dotted transparent;
  113. border-radius: 50%;
  114. inset-block-start: var(--admin-space-xs);
  115. inset-inline-start: var(--admin-space-xs);
  116. }
  117. }
  118. }
  119. @keyframes throbber {
  120. 0% {
  121. transform: rotateZ(0);
  122. }
  123. 100% {
  124. transform: rotateZ(360deg);
  125. }
  126. }

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