You are here

yamlform.element.likert.css in YAML Form 8

Likert element styles.

File

css/yamlform.element.likert.css
View source
  1. /**
  2. * @file
  3. * Likert element styles.
  4. */
  5. /**
  6. * Answer widths
  7. */
  8. [data-likert-answers-count="2"] th {
  9. width: 30%;
  10. }
  11. [data-likert-answers-count="3"] th {
  12. width: 20%;
  13. }
  14. [data-likert-answers-count="4"] th {
  15. width: 15%;
  16. }
  17. [data-likert-answers-count="5"] th {
  18. width: 12%;
  19. }
  20. [data-likert-answers-count="6"] th {
  21. width: 10%;
  22. }
  23. [data-likert-answers-count="7"] th {
  24. width: 8.57%;
  25. }
  26. [data-likert-answers-count="8"] th {
  27. width: 7.5%;
  28. }
  29. [data-likert-answers-count="9"] th {
  30. width: 6.66%;
  31. }
  32. [data-likert-answers-count="10"] th {
  33. width: 6%;
  34. }
  35. /**
  36. * Basic table formatting.
  37. */
  38. .yamlform-likert-table th,
  39. .yamlform-likert-table td {
  40. text-align: center;
  41. }
  42. .form-type-yamlform-likert td label {
  43. display: none;
  44. }
  45. .yamlform-likert-table th:first-child,
  46. .yamlform-likert-table td:first-child {
  47. text-align: inherit;
  48. width: 40%;
  49. }
  50. .form-type-yamlform-likert td:first-child label {
  51. display: block;
  52. }
  53. /**
  54. * Mobile support to likert form element table.
  55. */
  56. @media (max-width: 768px) {
  57. .form-type-yamlform-likert table {
  58. border-collapse: collapse;
  59. font-size: inherit;
  60. }
  61. .form-type-yamlform-likert thead {
  62. display: none;
  63. }
  64. .form-type-yamlform-likert tr,
  65. .form-type-yamlform-likert tr.odd {
  66. border: 0;
  67. background: transparent;
  68. }
  69. .form-type-yamlform-likert td {
  70. display: block;
  71. width: 100% !important;
  72. border: 0;
  73. background: transparent;
  74. padding: 0;
  75. text-align: inherit;
  76. }
  77. .form-type-yamlform-likert td label {
  78. display: inline;
  79. }
  80. .form-type-yamlform-likert td:last-child {
  81. margin-bottom: 1em;
  82. }
  83. }