_gf-form.scss 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. $gf-form-margin: 0.2rem;
  2. $gf-form-label-margin: 0.2rem;
  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. .checkbox-label {
  11. display: inline;
  12. cursor: pointer;
  13. padding: 8px 7px 8px 4px;
  14. }
  15. .cr1 {
  16. margin-left: 8px;
  17. }
  18. }
  19. .gf-form-group {
  20. margin-bottom: $spacer * 2.5;
  21. }
  22. .gf-form-inline {
  23. display: flex;
  24. flex-direction: row;
  25. flex-wrap: wrap;
  26. align-content: flex-start;
  27. .gf-form-flex {
  28. flex-grow: 1;
  29. }
  30. }
  31. .gf-form-button-row {
  32. margin-top: $spacer * 1.5;
  33. a, button {
  34. margin-right: $spacer;
  35. }
  36. }
  37. .gf-form-label {
  38. padding: $input-padding-y $input-padding-x;
  39. line-height: $input-line-height;
  40. flex-shrink: 0;
  41. background-color: $input-label-bg;
  42. display: block;
  43. font-size: $font-size-sm;
  44. margin-right: $gf-form-label-margin;
  45. border: $input-btn-border-width solid transparent;
  46. @include border-radius($label-border-radius-sm);
  47. }
  48. .gf-form-checkbox {
  49. flex-shrink: 0;
  50. }
  51. @each $size, $value in $form-sizes {
  52. .gf-size-#{$size} { width: $value; }
  53. .gf-size-max-#{$size} {
  54. flex-grow: 1;
  55. max-width: $value;
  56. }
  57. }
  58. .gf-size-max { width: 100%; }
  59. .gf-size-auto { width: auto; }
  60. .gf-form-input {
  61. display: block;
  62. width: 100%;
  63. padding: $input-padding-y $input-padding-x;
  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-bg;
  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. }
  79. // Customize the `:focus` state to imitate native WebKit styles.
  80. @include form-control-focus();
  81. // Placeholder
  82. &::placeholder {
  83. color: $input-color-placeholder;
  84. // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526.
  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-input > select {
  99. width: 115%;
  100. min-width: 110%;
  101. max-width: 115%;
  102. height: 24px;
  103. margin: 0;
  104. padding: 0 20px 0 0;
  105. border: 0;
  106. outline: none;
  107. background: transparent;
  108. color: $input-color;
  109. font-size: 16px;
  110. font-weight: 400;
  111. line-height: 24px;
  112. text-indent: .01px;
  113. text-overflow: '';
  114. -webkit-appearance: none;
  115. -moz-appearance: menulist-text; // was set to "window" and caused odd display on windos and linux.
  116. appearance: none;
  117. }
  118. // This hides native dropdown button arrow in IE
  119. .gf-form-input > select::-ms-expand {
  120. display: none;
  121. }
  122. .gf-form-input:after > select:after {
  123. position: absolute;
  124. top: 50%;
  125. right: 10px;
  126. height: 12px;
  127. margin-top: -6px;
  128. padding: 0;
  129. background-color: transparent;
  130. color: $input-color;
  131. font: normal normal normal 14px/1 FontAwesome;
  132. text-align: center;
  133. content: '\f0d7';
  134. pointer-events: none;
  135. }
  136. .gf-form-input > select:focus {
  137. outline: none;
  138. }
  139. // This hides focus around selected option in FF
  140. .gf-form-input > select:-moz-focusring {
  141. color: transparent;
  142. text-shadow: 0 0 0 #adafae;
  143. }
  144. // .gf-form-input {
  145. // margin: 0;
  146. // background: $input-color;
  147. // }
  148. .gf-form-select-interior {
  149. margin: 0;
  150. background-color: $input-bg;
  151. border: 1px solid $input-bg;
  152. }
  153. .gf-form-input > select {
  154. height: 34px;
  155. line-height: 34px;
  156. }
  157. .gf-form-btn {
  158. padding: $input-padding-y $input-padding-x;
  159. line-height: $input-line-height;
  160. flex-shrink: 0;
  161. flex-grow: 0;
  162. }