tabledrag.css

Table drag styling for off-canvas dialog.

@internal

See also

tabledrag.js

File

core/misc/dialog/off-canvas/css/tabledrag.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. * Table drag styling for off-canvas dialog.
  10. *
  11. * @see tabledrag.js
  12. *
  13. * @internal
  14. */
  15. #drupal-off-canvas-wrapper {
  16. /* The draggable element. */
  17. & .draggable {
  18. &:hover,
  19. &:focus-within {
  20. background-color: var(--off-canvas-background-color-light);
  21. }
  22. /* Appears when the row is being dragged. */
  23. &.drag {
  24. cursor: move;
  25. background-color: var(--off-canvas-background-color-dark);
  26. }
  27. }
  28. & td {
  29. transition: background-color 0.3s ease;
  30. /* We have to horizontally align all descendent nodes including text nodes
  31. * that do not have wrapper elements. Since we use flex to do this, we need
  32. * try to keep it vertically centered, so we have to give it a minimum height
  33. * to match the rest of the table cells. */
  34. &:first-child {
  35. display: flex;
  36. align-items: center;
  37. min-height: 3.125rem;
  38. gap: var(--off-canvas-table-cell-padding);
  39. }
  40. & abbr {
  41. margin-inline: 0 0.3125rem;
  42. -webkit-text-decoration: none;
  43. text-decoration: none;
  44. }
  45. }
  46. & .tabledrag-handle {
  47. flex-shrink: 0;
  48. &::after {
  49. display: block;
  50. width: 1.25rem;
  51. height: 1.25rem;
  52. margin: 0;
  53. padding: 0;
  54. content: "";
  55. cursor: move;
  56. background-color: transparent;
  57. background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3e%3cpath fill='%23bebebe' d='M14.904 7.753l-2.373-2.372c-.291-.292-.529-.193-.529.22v1.399h-3v-3h1.398c.414 0 .512-.239.221-.53l-2.371-2.372c-.137-.136-.36-.136-.497 0l-2.372 2.372c-.292.292-.193.53.22.53h1.399v3h-3v-1.369c0-.413-.239-.511-.53-.22l-2.372 2.372c-.136.136-.136.359 0 .494l2.372 2.372c.291.292.53.192.53-.219v-1.43h3v3h-1.4c-.413 0-.511.238-.22.529l2.374 2.373c.137.137.36.137.495 0l2.373-2.373c.29-.291.19-.529-.222-.529h-1.398v-3h3v1.4c0 .412.238.511.529.219l2.373-2.371c.137-.137.137-.359 0-.495z'/%3e%3c/svg%3e");
  58. background-repeat: no-repeat;
  59. background-position: center;
  60. @media (forced-colors: active) {
  61. background: linktext;
  62. mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3e%3cpath fill='%23bebebe' d='M14.904 7.753l-2.373-2.372c-.291-.292-.529-.193-.529.22v1.399h-3v-3h1.398c.414 0 .512-.239.221-.53l-2.371-2.372c-.137-.136-.36-.136-.497 0l-2.372 2.372c-.292.292-.193.53.22.53h1.399v3h-3v-1.369c0-.413-.239-.511-.53-.22l-2.372 2.372c-.136.136-.136.359 0 .494l2.372 2.372c.291.292.53.192.53-.219v-1.43h3v3h-1.4c-.413 0-.511.238-.22.529l2.374 2.373c.137.137.36.137.495 0l2.373-2.373c.29-.291.19-.529-.222-.529h-1.398v-3h3v1.4c0 .412.238.511.529.219l2.373-2.371c.137-.137.137-.359 0-.495z'/%3e%3c/svg%3e");
  63. mask-repeat: no-repeat;
  64. mask-position: center;
  65. }
  66. }
  67. }
  68. /* Make the "row weight" as small as possible. */
  69. & .tabledrag-hide select {
  70. all: revert;
  71. }
  72. & .tabledrag-changed-warning {
  73. margin-bottom: var(--off-canvas-vertical-spacing-unit);
  74. font-size: 0.875rem;
  75. }
  76. & .tabledrag-toggle-weight-wrapper {
  77. padding-top: 0.625rem;
  78. text-align: end;
  79. }
  80. & .indentation {
  81. width: 0.3125rem;
  82. }
  83. .touchevents & .draggable td {
  84. padding: 0 0.625rem;
  85. }
  86. .touchevents & .draggable .menu-item__link {
  87. display: inline-block;
  88. padding: 0.625rem 0;
  89. }
  90. .touchevents & a.tabledrag-handle {
  91. width: 2.5rem;
  92. height: 2.75rem;
  93. }
  94. }

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