You are here

formtips.css in Form Tips 8

.form-type-checkbox .formtips-wrapper {
  display: inline-block;
}

.formtip {
  display: inline-block;
  margin: 0 .3em;
  background-color: #ccc;
  border: 2px solid #ccc;
  color: #fff;
  border-radius: 50%;
  width: 13px;
  height: 13px;
  line-height: 13px;
  font-size: 12px;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  /* Needed for fieldset override. */
  letter-spacing: normal;

  box-sizing: content-box;
  vertical-align: baseline;
}

.formtip:focus,
.formtip:hover,
.formtip:active {
  background-color: #2369a6;
  border: 2px solid #2369a6;
  color: #fff;

  text-decoration: none;
  transition: all .25s ease-in-out;

  cursor: help;
}

.formtip::before {
  content: '?';
  color: #fff;
}

.formtips-processed:not(.formtips-show) {
  display: none;
  opacity: 0;
}

.formtips-processed.formtips-show {
  opacity: 1;
  display: block;
}

.formtips-processed {
  transition: opacity 0.25s ease-in-out;
  z-index: 100;
  display: none;
  text-align: left;
  padding: 20px;
  position: absolute;
  border-radius: 3px;
  box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
  /* font-size: 0.8em; */
  line-height: 1.4;
}

.formtips-processed ul.tips,
div.description.formtips-processed,
.form-item .description.formtips-processed,
.form-item__description.formtips-processed {
  color: #fff;
  margin: 0;
}

.formtips-processed.filter-guidelines,
div.description.formtips-processed,
.form-item .description.formtips-processed,
.form-item__description.formtips-processed {
  background-color: #1e2021;
}

.formtips-processed.filter-guidelines .filter-guidelines-item {
  margin: 0;
  color: #fff;
}

.filter-wrapper .form-item label {
  display: table;
}

/* The pointer of the tooltip. */
.formtips-processed::before {
  position: absolute;
  content: '';
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-bottom-color: #1e2021;
  left: 1.5em;
  top: -12px;
}

/* Ensure the wrapper doesn't cut off tip. */
.formtips-item {
  overflow: visible !important;
  position: relative;
}

/**
 * Workaround for Seven theme until
 * https://www.drupal.org/project/drupal/issues/3028675 is committed.
 */
.vertical-tabs {
  overflow: inherit !important;
}

File

css/formtips.css
View source
  1. .form-type-checkbox .formtips-wrapper {
  2. display: inline-block;
  3. }
  4. .formtip {
  5. display: inline-block;
  6. margin: 0 .3em;
  7. background-color: #ccc;
  8. border: 2px solid #ccc;
  9. color: #fff;
  10. border-radius: 50%;
  11. width: 13px;
  12. height: 13px;
  13. line-height: 13px;
  14. font-size: 12px;
  15. font-weight: bold;
  16. text-decoration: none;
  17. text-align: center;
  18. /* Needed for fieldset override. */
  19. letter-spacing: normal;
  20. box-sizing: content-box;
  21. vertical-align: baseline;
  22. }
  23. .formtip:focus,
  24. .formtip:hover,
  25. .formtip:active {
  26. background-color: #2369a6;
  27. border: 2px solid #2369a6;
  28. color: #fff;
  29. text-decoration: none;
  30. transition: all .25s ease-in-out;
  31. cursor: help;
  32. }
  33. .formtip::before {
  34. content: '?';
  35. color: #fff;
  36. }
  37. .formtips-processed:not(.formtips-show) {
  38. display: none;
  39. opacity: 0;
  40. }
  41. .formtips-processed.formtips-show {
  42. opacity: 1;
  43. display: block;
  44. }
  45. .formtips-processed {
  46. transition: opacity 0.25s ease-in-out;
  47. z-index: 100;
  48. display: none;
  49. text-align: left;
  50. padding: 20px;
  51. position: absolute;
  52. border-radius: 3px;
  53. box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
  54. /* font-size: 0.8em; */
  55. line-height: 1.4;
  56. }
  57. .formtips-processed ul.tips,
  58. div.description.formtips-processed,
  59. .form-item .description.formtips-processed,
  60. .form-item__description.formtips-processed {
  61. color: #fff;
  62. margin: 0;
  63. }
  64. .formtips-processed.filter-guidelines,
  65. div.description.formtips-processed,
  66. .form-item .description.formtips-processed,
  67. .form-item__description.formtips-processed {
  68. background-color: #1e2021;
  69. }
  70. .formtips-processed.filter-guidelines .filter-guidelines-item {
  71. margin: 0;
  72. color: #fff;
  73. }
  74. .filter-wrapper .form-item label {
  75. display: table;
  76. }
  77. /* The pointer of the tooltip. */
  78. .formtips-processed::before {
  79. position: absolute;
  80. content: '';
  81. width: 0;
  82. height: 0;
  83. border: 6px solid transparent;
  84. border-bottom-color: #1e2021;
  85. left: 1.5em;
  86. top: -12px;
  87. }
  88. /* Ensure the wrapper doesn't cut off tip. */
  89. .formtips-item {
  90. overflow: visible !important;
  91. position: relative;
  92. }
  93. /**
  94. * Workaround for Seven theme until
  95. * https://www.drupal.org/project/drupal/issues/3028675 is committed.
  96. */
  97. .vertical-tabs {
  98. overflow: inherit !important;
  99. }