rulebox.scss 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. // Styles for the rulebox module
  2. .rulebox {
  3. border: 1px solid $grey-color-light;
  4. padding: 20px;
  5. margin: 20px 0 30px 0;
  6. .prompt,
  7. .module-type-header {
  8. color: $grey-color-dark;
  9. font-family: $header-font-family;
  10. font-weight: bold;
  11. }
  12. .module-questions {
  13. color: $grey-color;
  14. font-size: .8em;
  15. }
  16. .module-type {
  17. margin-bottom: $spacing-unit/2;
  18. }
  19. .prompt,
  20. .delete-module,
  21. .rulebuilder_modules,
  22. .linkbox_input,
  23. .metadata_input {
  24. display: none;
  25. }
  26. .editable[contenteditable="true"] { /* active editable fields */
  27. border-bottom: 1px dashed $grey-color-dark;
  28. }
  29. .editable[contenteditable="false"] { /* inactive editable fields */
  30. border: none;
  31. }
  32. // TODO: module display is set within the spreadsheet
  33. .rulebuilder_input .module .delete-module {
  34. display: none !important;
  35. }
  36. .rulebuilder {}
  37. .rulebuilder_input {
  38. overflow: hidden;
  39. margin: 0 0 $spacing-unit;
  40. text-align: left;
  41. min-height: 1.5em;
  42. .prompt {
  43. color: $text-color;
  44. }
  45. .module .module-info {
  46. display: none;
  47. }
  48. }
  49. .rulebuilder_list {}
  50. .rulebuilder_modules {
  51. .module .delete-module {
  52. display: none;
  53. }
  54. }
  55. .metadata_input,
  56. .metadata_display {
  57. border: 1px solid $grey-color-light;
  58. background-color: white;
  59. margin: $spacing-unit 0 15px 0;
  60. padding: 10px;
  61. }
  62. .metadata_display {
  63. border-radius: 6px;
  64. text-align: center;
  65. }
  66. .metadata_input {
  67. input {
  68. margin-bottom: $spacing-unit / 2;
  69. }
  70. }
  71. &.rulebox-preview {
  72. // this class is toggled by toggleEditMode() in rule-scrips.html
  73. // when preview/customize button is pressed
  74. }
  75. &.rulebox-edit {
  76. // this class is toggled by toggleEditMode() in rule-scrips.html
  77. // when preview/customize button is pressed
  78. .prompt,
  79. .delete-module,
  80. .rulebuilder_modules,
  81. .metadata_input {
  82. display: block;
  83. }
  84. .linkbox_input {
  85. display: inline;
  86. }
  87. .metadata_display {
  88. display: none;
  89. }
  90. .prompt .module {
  91. margin: 0;
  92. &:hover,
  93. &:active {
  94. border-color: inherit;
  95. cursor: default;
  96. }
  97. }
  98. .module:hover {
  99. cursor: grab;
  100. border-color: $grey-color-dark;
  101. .module-logo {
  102. cursor: pointer;
  103. }
  104. }
  105. .module:active {
  106. cursor: grabbing;
  107. border-color: $brand-yellow;
  108. }
  109. .rulebuilder_input .module .delete-module {
  110. display: inline !important;
  111. }
  112. .module.module-custom {
  113. input {
  114. border-width: 0 0 1px 0;
  115. border-bottom: 1px dashed $grey-color-dark;
  116. font-family: inherit;
  117. font-size: inherit;
  118. padding: 5px;
  119. }
  120. }
  121. .rulebuilder {}
  122. .rulebuilder_input {
  123. &.drag-target {
  124. background-color: $brand-yellow;
  125. border-style: solid;
  126. }
  127. border: 4px dashed $brand-yellow;
  128. color: $text-color;
  129. padding: 10px 10px 10px 10px;
  130. }
  131. }
  132. }