fieldset.pcss.css

Same filename in this branch
  1. 11.x core/themes/olivero/css/components/fieldset.pcss.css
Same filename in other branches
  1. 9 core/themes/olivero/css/components/fieldset.pcss.css
  2. 9 core/themes/claro/css/components/fieldset.pcss.css
  3. 8.9.x core/themes/claro/css/components/fieldset.pcss.css
  4. 10 core/themes/olivero/css/components/fieldset.pcss.css
  5. 10 core/themes/claro/css/components/fieldset.pcss.css

Fieldset styles.

File

core/themes/claro/css/components/fieldset.pcss.css

View source
  1. /**
  2. * @file
  3. * Fieldset styles.
  4. */
  5. .fieldset {
  6. min-width: 0;
  7. margin: var(--space-m) 0;
  8. padding: 0;
  9. color: var(--color-text);
  10. border: var(--details-border-size) solid var(--details-border-color);
  11. border-radius: var(--base-border-radius);
  12. background-color: var(--color-white);
  13. box-shadow: var(--details-box-shadow);
  14. }
  15. .fieldset--group {
  16. color: inherit;
  17. border: 0;
  18. border-radius: 0;
  19. background: none;
  20. box-shadow: none;
  21. }
  22. /**
  23. * Fieldset legend.
  24. */
  25. .fieldset__legend {
  26. display: contents; /* For Firefox. */
  27. float: left; /* iOS Safari, Android Chrome, Edge. */
  28. width: 100%; /* iOS Safari, Android Chrome, Edge. */
  29. margin-block-end: var(--space-m);
  30. color: var(--color-gray-800);
  31. font-weight: bold;
  32. }
  33. .fieldset__legend--composite {
  34. float: none;
  35. width: auto;
  36. margin-block-start: calc(var(--space-xs) / 2); /* 4px */
  37. margin-block-end: calc(var(--space-xs) / 2); /* 4px */
  38. color: inherit;
  39. font-size: var(--font-size-s); /* 14px */
  40. line-height: calc(18rem / 16); /* 18px */
  41. }
  42. @media screen and (min-width: 48em) {
  43. .fieldset__legend {
  44. margin-bottom: var(--space-l);
  45. }
  46. }
  47. /* This is used only on install configure form. */
  48. .fieldset__legend--group {
  49. text-transform: uppercase;
  50. color: inherit;
  51. }
  52. .fieldset__label {
  53. display: block;
  54. padding: var(--space-m);
  55. line-height: var(--space-m);
  56. &.is-disabled {
  57. color: var(--input--disabled-fg-color);
  58. }
  59. &.has-error {
  60. color: var(--input--error-color);
  61. }
  62. }
  63. .fieldset__label--group {
  64. padding: 0;
  65. line-height: inherit;
  66. }
  67. @media screen and (min-width: 48em) {
  68. .fieldset__label {
  69. padding-right: var(--space-l);
  70. padding-left: var(--space-l);
  71. }
  72. .fieldset__label--group {
  73. padding: 0;
  74. }
  75. }
  76. .fieldset__description {
  77. margin-block-start: calc(6rem / 16); /* 6px */
  78. margin-block-end: calc(6rem / 16); /* 6px */
  79. color: var(--input-fg-color--description);
  80. font-size: var(--font-size-xs); /* ~13px */
  81. line-height: calc(17rem / 16); /* 17px */
  82. &.is-disabled {
  83. color: var(--input--disabled-fg-color);
  84. }
  85. }
  86. /* Error message (Inline form errors). */
  87. .fieldset__error-message {
  88. margin-block-start: calc(6rem / 16); /* 6px */
  89. margin-block-end: calc(6rem / 16); /* 6px */
  90. color: var(--input--error-color);
  91. font-size: var(--font-size-xs); /* ~13px */
  92. font-weight: normal;
  93. line-height: calc(17rem / 16); /* 17px */
  94. }
  95. .fieldset__wrapper {
  96. margin: var(--space-m);
  97. /**
  98. * Remove the extra padding of container-inline wrapper if it's used inside a fieldset
  99. */
  100. & > .container-inline {
  101. padding: 0;
  102. }
  103. }
  104. @media screen and (min-width: 48em) {
  105. .fieldset__wrapper {
  106. margin: var(--space-l) var(--space-l) calc(var(--space-m) + var(--space-s));
  107. }
  108. }
  109. .fieldset__legend--visible ~ .fieldset__wrapper {
  110. margin-block-start: 0;
  111. }
  112. .fieldset__wrapper--group {
  113. margin: 0;
  114. }

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