field_ui_add_field.module.pcss.css

Same filename in other branches
  1. 10 core/modules/field_ui/css/field_ui_add_field.module.pcss.css

field_ui_add_field.module.css

File

core/modules/field_ui/css/field_ui_add_field.module.pcss.css

View source
  1. /**
  2. * @file field_ui_add_field.module.css
  3. */
  4. .field-ui-field-storage-add-form {
  5. --thumb-size: 72px;
  6. --color-focus: #26a769;
  7. --color-gray: #232429;
  8. --input-fg-color: var(--color-gray);
  9. --color-blue: #003ecc;
  10. --color-red: #dc2323;
  11. --details-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  12. }
  13. .field-ui-new-storage-wrapper {
  14. margin-bottom: 0.75rem;
  15. }
  16. .group-field-options-wrapper {
  17. margin-block: 1.5em;
  18. }
  19. .add-field-container,
  20. .group-field-options {
  21. display: grid;
  22. gap: 0.75rem 1.25rem;
  23. margin-block: 0.625rem;
  24. @media (min-width: 45rem) {
  25. grid-template-columns: repeat(2, 1fr);
  26. }
  27. }
  28. .add-field-container {
  29. @media (min-width: 75rem) {
  30. grid-template-columns: repeat(3, 1fr);
  31. }
  32. @media (min-width: 87.5rem) {
  33. grid-template-columns: repeat(4, 1fr);
  34. }
  35. }
  36. .field-option {
  37. display: grid;
  38. grid-template-columns: var(--thumb-size) auto;
  39. align-items: center;
  40. padding: 0.25rem;
  41. padding-inline-end: 0.75rem;
  42. border: 1px solid #dedfe4;
  43. gap: 0.75rem;
  44. border-radius: 4px;
  45. }
  46. .field-option__item {
  47. display: grid;
  48. grid-template-rows: auto 2fr;
  49. grid-template-columns: auto 1.1875rem;
  50. align-items: center;
  51. width: 100%;
  52. margin: 0;
  53. column-gap: 1.25rem;
  54. padding-block: 0.25rem;
  55. > *:not(input) {
  56. grid-column: 1;
  57. }
  58. > input {
  59. grid-row: 1 / -1;
  60. grid-column: 2;
  61. }
  62. }
  63. .field-option__thumb {
  64. height: 100%;
  65. min-height: var(--thumb-size);
  66. background-color: #f3f4f9;
  67. }
  68. .subfield-option {
  69. margin-block: 0.625rem;
  70. padding: 1rem;
  71. padding-inline-end: 2rem;
  72. border: 1px solid #d3d4d9;
  73. border-radius: 4px;
  74. .field-option-radio {
  75. margin-inline-end: 0.4375rem;
  76. }
  77. .item-list ul {
  78. margin-inline: 0;
  79. }
  80. }
  81. .field-option,
  82. .subfield-option {
  83. cursor: pointer;
  84. &.focus {
  85. outline: 3px solid var(--color-focus);
  86. outline-offset: 2px;
  87. }
  88. &.hover {
  89. border-color: var(--color-gray);
  90. box-shadow:
  91. inset 0 0 0 1px var(--color-gray),
  92. var(--details-box-shadow);
  93. }
  94. &:not(.selected, .error):hover .form-boolean {
  95. border-color: var(--input-fg-color);
  96. box-shadow: inset 0 0 0 1px var(--input-fg-color);
  97. }
  98. &.selected {
  99. border-color: var(--color-blue);
  100. box-shadow:
  101. inset 0 0 0 2px var(--color-blue),
  102. var(--details-box-shadow);
  103. }
  104. &.error {
  105. border-color: var(--color-red);
  106. box-shadow:
  107. inset 0 0 0 1px var(--color-red),
  108. var(--details-box-shadow);
  109. }
  110. & .form-item__label.has-error {
  111. color: currentColor;
  112. }
  113. }

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