tabledrag.css

Same filename in this branch
  1. 8.9.x core/profiles/demo_umami/themes/umami/css/classy/components/tabledrag.css
  2. 8.9.x core/themes/seven/css/classy/components/tabledrag.css
  3. 8.9.x core/themes/bartik/css/classy/components/tabledrag.css
  4. 8.9.x core/themes/classy/css/components/tabledrag.css
Same filename in other branches
  1. 9 core/profiles/demo_umami/themes/umami/css/classy/components/tabledrag.css
  2. 9 core/themes/olivero/css/components/tabledrag.css
  3. 9 core/themes/seven/css/classy/components/tabledrag.css
  4. 9 core/themes/claro/css/components/tabledrag.css
  5. 9 core/themes/bartik/css/classy/components/tabledrag.css
  6. 9 core/themes/starterkit_theme/css/components/tabledrag.css
  7. 9 core/themes/classy/css/components/tabledrag.css
  8. 10 core/profiles/demo_umami/themes/umami/css/classy/components/tabledrag.css
  9. 10 core/misc/dialog/off-canvas/css/tabledrag.css
  10. 10 core/themes/olivero/css/components/tabledrag.css
  11. 10 core/themes/claro/css/components/tabledrag.css
  12. 10 core/themes/starterkit_theme/css/components/tabledrag.css
  13. 11.x core/profiles/demo_umami/themes/umami/css/classy/components/tabledrag.css
  14. 11.x core/misc/dialog/off-canvas/css/tabledrag.css
  15. 11.x core/themes/olivero/css/components/tabledrag.css
  16. 11.x core/themes/claro/css/components/tabledrag.css
  17. 11.x core/themes/starterkit_theme/css/components/tabledrag.css

Replacement styles for table drag.

Replaces both of tabledrag.module.css (from core/stable) and tabledrag.css (from Classy theme).

See also

tabledrag.js

File

core/themes/claro/css/components/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/2815083
  5. * @preserve
  6. */
  7. /**
  8. * @file
  9. * Replacement styles for table drag.
  10. *
  11. * Replaces both of tabledrag.module.css (from core/stable) and tabledrag.css
  12. * (from Classy theme).
  13. *
  14. * @see tabledrag.js
  15. */
  16. body.drag {
  17. cursor: move;
  18. }
  19. /* The block region's title row in table. */
  20. .region-title {
  21. font-weight: bold;
  22. }
  23. /* Empty region message row in table. */
  24. .region-message {
  25. color: #82828c;
  26. }
  27. /* If the region is populated, we shouldn't display the empty message. */
  28. .region-message.region-populated {
  29. display: none;
  30. }
  31. /**
  32. * Remove border-bottom from abbr element. Class is duplicated in the selector
  33. * to increase weight to be able to win normalize.css selectors.
  34. */
  35. .tabledrag-changed.tabledrag-changed {
  36. border-bottom: none;
  37. }
  38. /* Don't display the abbreviation of 'add-new' table rows. */
  39. .add-new .tabledrag-changed {
  40. display: none;
  41. }
  42. .draggable .tabledrag-changed {
  43. position: relative;
  44. left: -0.5rem; /* LTR */
  45. }
  46. [dir="rtl"] .draggable .tabledrag-changed {
  47. right: -0.5rem; /* LTR */
  48. left: auto;
  49. }
  50. .tabledrag-cell--only-drag .tabledrag-changed {
  51. width: 1.5rem;
  52. min-width: 1.5rem;
  53. }
  54. /**
  55. * Draggable row state colors.
  56. */
  57. .draggable.drag,
  58. .draggable.drag:focus {
  59. background-color: #fe7;
  60. }
  61. .draggable.drag-previous {
  62. background-color: #ffb;
  63. }
  64. /**
  65. * Reduce the spacing of draggable table cells.
  66. */
  67. .draggable-table td:first-child ~ td,
  68. .draggable-table th:first-child ~ th {
  69. padding-left: 0 /* LTR */;
  70. }
  71. [dir="rtl"] .draggable-table td:first-child ~ td,
  72. [dir="rtl"] .draggable-table th:first-child ~ th {
  73. padding-right: 0;
  74. padding-left: 1rem;
  75. }
  76. /* Auto width for weight selects and number inputs. */
  77. .draggable td .form-element--type-select[name$="][_weight]"], /* Multiple field */
  78. .draggable td .term-weight, /* Taxonomy term list */
  79. .draggable td .field-weight /* Field UI table */ {
  80. width: auto;
  81. }
  82. /**
  83. * Handle styles.
  84. */
  85. .tabledrag-handle {
  86. position: relative;
  87. z-index: 1;
  88. overflow: visible;
  89. cursor: move;
  90. text-align: center;
  91. vertical-align: text-top;
  92. }
  93. .tabledrag-handle::after {
  94. display: inline-block;
  95. width: 1.0625rem;
  96. height: 1.0625rem;
  97. margin-left: -1rem; /* LTR */
  98. padding: 0.5rem 1rem;
  99. content: "";
  100. transition: transform 0.1s ease-in-out 0s;
  101. background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='m 14.102955,5.47562 c -0.1819,-0.20654 -0.4917,-0.23016 -0.7014,-0.05265 -0.2098,0.17684 -0.2462,0.4914 -0.0814,0.71278 l 1.0998,1.34591 H 8.5124153 V 1.62014 l 1.31954,1.11304 c 0.1033,0.0945 0.2395997,0.14242 0.3771997,0.13162 0.1383,-0.01013 0.2667,-0.07762 0.3548,-0.18629 0.088,-0.10935 0.129,-0.24974 0.1131,-0.39014 -0.0159,-0.14039 -0.0873,-0.26796 -0.1979,-0.35369 L 8.3278353,0.118965 c -0.1879501,-0.1586199 -0.4592601,-0.1586199 -0.6472101,0 l -2.15136,1.815715 c -0.11052,0.08572 -0.1819799,0.2133 -0.19787,0.35369 -0.0159,0.1404 0.02514,0.2808 0.1131601,0.39014 0.08801,0.10867 0.2163899,0.17616 0.35471,0.18629 0.1376499,0.0108 0.2739799,-0.03712 0.3772199,-0.13162 l 1.31956,-1.11304 v 5.86152 h -5.90757 L 2.6797353,6.13575 c 0.13963,-0.22004 0.09661,-0.51163 -0.10059,-0.6797 -0.19722,-0.16875 -0.4864,-0.15997 -0.67369,0.01957 L 0.11663625,7.66993 c -0.155515,0.1917 -0.155515,0.46843 0,0.66013 L 1.9054553,10.5244 c 0.18199,0.2065 0.49169,0.2301 0.70147,0.0526 0.20978,-0.1768 0.24617,-0.4914 0.0814,-0.71276 l -1.09986,-1.34591 h 5.9075699 v 5.86147 l -1.3195699,-1.113 c -0.2170501,-0.1681 -0.52545,-0.1316 -0.6988201,0.0824 -0.1740399,0.2146 -0.15089,0.5298 0.05162,0.7161 l 2.15136,1.8164 v -7e-4 c 0.18794,0.1587 0.4592601,0.1587 0.6472001,0 l 2.1513297,-1.8157 c 0.2025,-0.1863 0.2257,-0.5015 0.0517,-0.7161 -0.1734,-0.214 -0.4818,-0.2504 -0.6988997,-0.0824 l -1.31954,1.1131 V 8.51835 h 5.9075397 l -1.0912,1.3459 c -0.1059,0.10193 -0.1641,0.24505 -0.1602,0.39285 0.004,0.1485 0.0702,0.2875 0.182,0.3827 0.1119,0.0952 0.2581,0.137 0.4017,0.1154 0.1436,-0.0223 0.2713,-0.106 0.3507,-0.2308 l 1.7809,-2.19434 c 0.1549,-0.19169 0.1549,-0.46842 0,-0.66012 z'/%3E%3C/svg%3E") no-repeat center;
  102. }
  103. [dir="rtl"] .tabledrag-handle::after {
  104. margin-right: -1rem;
  105. margin-left: 0;
  106. }
  107. @media screen and (-ms-high-contrast: active) {
  108. .tabledrag-handle::after {
  109. content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' d='m 14.102955,5.47562 c -0.1819,-0.20654 -0.4917,-0.23016 -0.7014,-0.05265 -0.2098,0.17684 -0.2462,0.4914 -0.0814,0.71278 l 1.0998,1.34591 H 8.5124153 V 1.62014 l 1.31954,1.11304 c 0.1033,0.0945 0.2395997,0.14242 0.3771997,0.13162 0.1383,-0.01013 0.2667,-0.07762 0.3548,-0.18629 0.088,-0.10935 0.129,-0.24974 0.1131,-0.39014 -0.0159,-0.14039 -0.0873,-0.26796 -0.1979,-0.35369 L 8.3278353,0.118965 c -0.1879501,-0.1586199 -0.4592601,-0.1586199 -0.6472101,0 l -2.15136,1.815715 c -0.11052,0.08572 -0.1819799,0.2133 -0.19787,0.35369 -0.0159,0.1404 0.02514,0.2808 0.1131601,0.39014 0.08801,0.10867 0.2163899,0.17616 0.35471,0.18629 0.1376499,0.0108 0.2739799,-0.03712 0.3772199,-0.13162 l 1.31956,-1.11304 v 5.86152 h -5.90757 L 2.6797353,6.13575 c 0.13963,-0.22004 0.09661,-0.51163 -0.10059,-0.6797 -0.19722,-0.16875 -0.4864,-0.15997 -0.67369,0.01957 L 0.11663625,7.66993 c -0.155515,0.1917 -0.155515,0.46843 0,0.66013 L 1.9054553,10.5244 c 0.18199,0.2065 0.49169,0.2301 0.70147,0.0526 0.20978,-0.1768 0.24617,-0.4914 0.0814,-0.71276 l -1.09986,-1.34591 h 5.9075699 v 5.86147 l -1.3195699,-1.113 c -0.2170501,-0.1681 -0.52545,-0.1316 -0.6988201,0.0824 -0.1740399,0.2146 -0.15089,0.5298 0.05162,0.7161 l 2.15136,1.8164 v -7e-4 c 0.18794,0.1587 0.4592601,0.1587 0.6472001,0 l 2.1513297,-1.8157 c 0.2025,-0.1863 0.2257,-0.5015 0.0517,-0.7161 -0.1734,-0.214 -0.4818,-0.2504 -0.6988997,-0.0824 l -1.31954,1.1131 V 8.51835 h 5.9075397 l -1.0912,1.3459 c -0.1059,0.10193 -0.1641,0.24505 -0.1602,0.39285 0.004,0.1485 0.0702,0.2875 0.182,0.3827 0.1119,0.0952 0.2581,0.137 0.4017,0.1154 0.1436,-0.0223 0.2713,-0.106 0.3507,-0.2308 l 1.7809,-2.19434 c 0.1549,-0.19169 0.1549,-0.46842 0,-0.66012 z'/%3E%3C/svg%3E");
  110. background: none;
  111. }
  112. }
  113. .tabledrag-handle::after,
  114. .tabledrag-disabled .tabledrag-handle.tabledrag-handle.tabledrag-handle::after {
  115. transform: scale(1);
  116. }
  117. .tabledrag-handle:hover::after,
  118. .tabledrag-handle:focus::after,
  119. .draggable.drag .tabledrag-handle::after {
  120. transform: scale(1.25);
  121. }
  122. .tabledrag-handle:focus {
  123. outline: none !important;
  124. box-shadow: none !important;
  125. }
  126. .tabledrag-handle:focus::before {
  127. display: block;
  128. width: 2rem; /* Same as height. */
  129. height: 2rem; /* Hande svg height + its vertical padding */
  130. margin: 0 -0.5rem -2rem; /* Bottom: handle height as negative value. */
  131. content: "";
  132. border-radius: 2px;
  133. outline: 2px dotted transparent;
  134. box-shadow: 0 0 0 3px #26a769;
  135. }
  136. /* Disabled tabledrag handle. */
  137. .tabledrag-disabled .tabledrag-handle {
  138. cursor: default;
  139. opacity: 0.4;
  140. }
  141. .tabledrag-disabled .tabledrag-handle.tabledrag-handle::before {
  142. content: normal;
  143. }
  144. /**
  145. * Enhancements for touch-capable screens.
  146. */
  147. /**
  148. * Increase handle size.
  149. */
  150. .touchevents .tabledrag-handle::after {
  151. padding-top: 0.75rem;
  152. padding-bottom: 0.75rem;
  153. }
  154. .touchevents .draggable .menu-item__link {
  155. padding-top: 0.5rem;
  156. padding-bottom: 0.5rem;
  157. }
  158. /**
  159. * Wrapper of the toggle weight button (styled as a link).
  160. */
  161. .tabledrag-toggle-weight-wrapper {
  162. text-align: right; /* LTR */
  163. }
  164. [dir="rtl"] .tabledrag-toggle-weight-wrapper {
  165. text-align: left;
  166. }
  167. /**
  168. * Keep crowded tabledrag cells vertically centered.
  169. */
  170. .tabledrag-cell {
  171. padding-top: 0;
  172. padding-bottom: 0;
  173. }
  174. /**
  175. * If the first table cell is empty (like in a multiple field widget table),
  176. * we can save some space for the following cells.
  177. * If it isn't empty (Field UI table, taxonomy term overview page), this CSS
  178. * class won't be added.
  179. */
  180. .tabledrag-cell--only-drag {
  181. width: 1px; /* This forces this cell to use the smallest possible width. */
  182. padding-right: 0; /* LTR */
  183. }
  184. [dir="rtl"] .tabledrag-cell--only-drag {
  185. padding-right: 1rem;
  186. padding-left: 0;
  187. }
  188. .tabledrag-cell-content {
  189. display: table;
  190. height: 100%;
  191. }
  192. .tabledrag-cell-content > * {
  193. display: table-cell;
  194. vertical-align: middle;
  195. }
  196. .tabledrag-cell-content__item {
  197. padding-right: 0.5rem; /* LTR */
  198. }
  199. [dir="rtl"] .tabledrag-cell-content__item {
  200. padding-right: 0;
  201. padding-left: 0.5rem;
  202. }
  203. .tabledrag-cell-content__item:empty {
  204. display: none;
  205. }
  206. .tabledrag-cell-content .indentation,
  207. [dir="rtl"] .tabledrag-cell-content .indentation {
  208. float: none;
  209. overflow: hidden;
  210. height: 100%;
  211. }
  212. .tabledrag-cell-content .tree {
  213. min-height: 100%; /* Using simply 'height: 100%' would make IE11 rendering ugly. */
  214. }
  215. /**
  216. * Safari (at least version 13.0) thinks that if we define a width or height for
  217. * and SVG, then we refer to the elements total size inside the SVG.
  218. * We only want to inherit the height of the parent element.
  219. */
  220. /* stylelint-disable-next-line unit-whitelist */
  221. @media not all and (min-resolution: 0.001dpcm) {
  222. @media {
  223. .tabledrag-cell-content .tree {
  224. overflow: visible;
  225. min-height: 0;
  226. }
  227. }
  228. }
  229. .tabledrag-cell-content .tabledrag-handle::after {
  230. vertical-align: middle;
  231. }
  232. /**
  233. * Indentation.
  234. */
  235. .indentation {
  236. position: relative;
  237. left: -0.25rem; /* LTR */
  238. float: left; /* LTR */
  239. width: 1.5625rem; /* 25px */
  240. height: 1.5625rem; /* 25px */
  241. background: none !important;
  242. line-height: 0;
  243. }
  244. [dir="rtl"] .indentation {
  245. right: -0.25rem;
  246. left: auto;
  247. float: right;
  248. }
  249. /**
  250. * Tree is the visual representation for the simultaneously moved draggable
  251. * rows.
  252. *
  253. * These rules are styleing the inline SVG that is placed inside the .indetation
  254. * element.
  255. */
  256. .tree {
  257. width: 1.5625rem; /* 25px */
  258. height: 1.5625rem; /* 25px */
  259. }
  260. .tree__item {
  261. display: none;
  262. }
  263. /* LTR tree child. */
  264. .tree-child path:not(.tree__item-child-ltr) {
  265. display: none;
  266. }
  267. .tree-child path.tree__item-child-ltr {
  268. display: block;
  269. }
  270. /* RTL tree child. */
  271. [dir="rtl"] .tree-child path:not(.tree__item-child-rtl) {
  272. display: none;
  273. }
  274. [dir="rtl"] .tree-child path.tree__item-child-rtl {
  275. display: block;
  276. }
  277. /* Last LTR tree child. */
  278. .tree-child-last path:not(.tree__item-child-last-ltr) {
  279. display: none;
  280. }
  281. .tree-child-last path.tree__item-child-last-ltr {
  282. display: block;
  283. }
  284. /* Last RTL tree child. */
  285. [dir="rtl"] .tree-child-last path:not(.tree__item-child-last-rtl) {
  286. display: none;
  287. }
  288. [dir="rtl"] .tree-child-last path.tree__item-child-last-rtl {
  289. display: block;
  290. }
  291. /* Horizontal line. */
  292. .tree-child-horizontal path:not(.tree__item-horizontal) {
  293. display: none;
  294. }
  295. .tree-child-horizontal path.tree__item-horizontal {
  296. display: block;
  297. }

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