_gf-form.scss 3.3 KB

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