_gf-form.scss 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. $gf-form-margin: 0.25rem;
  2. $gf-form-label-margin: 0.25rem;
  3. .gf-form {
  4. margin-bottom: $gf-form-margin;
  5. margin-right: $gf-form-margin;
  6. display: flex;
  7. flex-direction: row;
  8. align-items: center;
  9. text-align: left;
  10. .cr1 {
  11. margin-left: 8px;
  12. }
  13. }
  14. .gf-form-group {
  15. margin-bottom: $spacer * 2.5;
  16. }
  17. .gf-form-inline {
  18. display: flex;
  19. flex-direction: row;
  20. flex-wrap: wrap;
  21. align-content: flex-start;
  22. .gf-form-flex {
  23. flex-grow: 1;
  24. }
  25. }
  26. .gf-form-button-row {
  27. padding-top: $spacer * 1.5;
  28. a, button {
  29. margin-right: $spacer;
  30. }
  31. }
  32. .gf-form-label {
  33. padding: $input-padding-y $input-padding-x;
  34. line-height: $input-line-height;
  35. flex-shrink: 0;
  36. background-color: $input-label-bg;
  37. display: block;
  38. font-size: $font-size-sm;
  39. margin-right: $gf-form-label-margin;
  40. border: $input-btn-border-width solid transparent;
  41. @include border-radius($label-border-radius-sm);
  42. }
  43. .gf-form-label--textarea {
  44. line-height: $input-line-height * 2;
  45. padding-top: 0px;
  46. padding-bottom: 16px; // $spacer (1rem) was slightly too short.
  47. }
  48. .gf-form-checkbox {
  49. flex-shrink: 0;
  50. padding: $input-padding-y $input-padding-x;
  51. line-height: $input-line-height;
  52. .checkbox-label {
  53. display: inline;
  54. cursor: pointer;
  55. padding: $input-padding-y 0.4rem;
  56. line-height: $input-line-height;
  57. }
  58. }
  59. .gf-form-input {
  60. display: block;
  61. width: 100%;
  62. padding: $input-padding-y $input-padding-x;
  63. margin-right: $gf-form-label-margin;
  64. font-size: $font-size-base;
  65. line-height: $input-line-height;
  66. color: $input-color;
  67. background-color: $input-bg;
  68. background-image: none;
  69. background-clip: padding-box;
  70. border: $input-btn-border-width solid $input-border-color;
  71. @include border-radius($input-border-radius-sm);
  72. @include box-shadow($input-box-shadow);
  73. transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  74. // Unstyle the caret on `<select>`s in IE10+.
  75. &::-ms-expand {
  76. background-color: transparent;
  77. border: 0;
  78. display: none;
  79. }
  80. // Customize the `:focus` state to imitate native WebKit styles.
  81. @include form-control-focus();
  82. // Placeholder
  83. &::placeholder {
  84. color: $input-color-placeholder;
  85. opacity: 1;
  86. }
  87. &:disabled,
  88. &[readonly] {
  89. background-color: $input-bg-disabled;
  90. // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
  91. opacity: 1;
  92. }
  93. &:disabled {
  94. cursor: $cursor-disabled;
  95. }
  96. &.gf-size-auto { width: auto; }
  97. }
  98. .gf-form-select-wrapper {
  99. position: relative;
  100. background-color: $input-bg;
  101. margin-right: $gf-form-label-margin;
  102. select.gf-form-input {
  103. text-indent: .01px;
  104. text-overflow: '';
  105. padding-right: $input-padding-x*2;
  106. -webkit-appearance: none;
  107. -moz-appearance: menulist-text; // was set to "window" and caused odd display on windos and linux.
  108. appearance: none;
  109. &:-moz-focusring {
  110. outline: none;
  111. color: transparent;
  112. text-shadow: 0 0 0 $text-color;
  113. }
  114. }
  115. &:after {
  116. position: absolute;
  117. top: 35%;
  118. right: $input-padding-x/2;
  119. background-color: transparent;
  120. color: $input-color;
  121. font: normal normal normal $font-size-sm/1 FontAwesome;
  122. content: '\f0d7';
  123. pointer-events: none;
  124. }
  125. }
  126. .gf-form--textarea {
  127. align-items: flex-start;
  128. }
  129. input[type="number"].gf-natural-language-form {
  130. font-size: $font-size-base;
  131. line-height: $input-line-height;
  132. margin: -6px -5px 0 5px;
  133. padding: $input-padding-y/2 $input-padding-x/2;
  134. }
  135. .gf-form-btn {
  136. padding: $input-padding-y $input-padding-x;
  137. line-height: $input-line-height;
  138. flex-shrink: 0;
  139. flex-grow: 0;
  140. }