_gf-form.scss 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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. margin-right: $gf-form-margin;
  33. line-height: $input-line-height;
  34. flex-shrink: 0;
  35. background-color: $input-label-bg;
  36. display: block;
  37. font-size: $font-size-sm;
  38. border: $input-btn-border-width solid transparent;
  39. @include border-radius($label-border-radius-sm);
  40. }
  41. .gf-form-switch-wrapper {
  42. margin-right: $gf-form-margin;
  43. }
  44. .gf-form-checkbox {
  45. flex-shrink: 0;
  46. padding: $input-padding-y $input-padding-x;
  47. line-height: $input-line-height;
  48. .checkbox-label {
  49. display: inline;
  50. cursor: pointer;
  51. padding: $input-padding-y 0.4rem;
  52. line-height: $input-line-height;
  53. }
  54. }
  55. .gf-form-input {
  56. display: block;
  57. width: 100%;
  58. padding: $input-padding-y $input-padding-x;
  59. margin-right: $gf-form-margin;
  60. font-size: $font-size-base;
  61. line-height: $input-line-height;
  62. color: $input-color;
  63. background-color: $input-bg;
  64. background-image: none;
  65. background-clip: padding-box;
  66. border: $input-btn-border-width solid $input-border-color;
  67. @include border-radius($input-border-radius-sm);
  68. @include box-shadow($input-box-shadow);
  69. transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  70. // Unstyle the caret on `<select>`s in IE10+.
  71. &::-ms-expand {
  72. background-color: transparent;
  73. border: 0;
  74. display: none;
  75. }
  76. // Customize the `:focus` state to imitate native WebKit styles.
  77. @include form-control-focus();
  78. // Placeholder
  79. &::placeholder {
  80. color: $input-color-placeholder;
  81. opacity: 1;
  82. }
  83. &:disabled,
  84. &[readonly] {
  85. background-color: $input-bg-disabled;
  86. // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
  87. opacity: 1;
  88. }
  89. &:disabled {
  90. cursor: $cursor-disabled;
  91. }
  92. &.gf-size-auto { width: auto; }
  93. }
  94. .gf-form-select-wrapper {
  95. margin-right: $gf-form-margin;
  96. position: relative;
  97. background-color: $input-bg;
  98. select.gf-form-input {
  99. text-indent: .01px;
  100. text-overflow: '';
  101. padding-right: $input-padding-x*2;
  102. -webkit-appearance: none;
  103. -moz-appearance: menulist-text; // was set to "window" and caused odd display on windos and linux.
  104. appearance: none;
  105. &:-moz-focusring {
  106. outline: none;
  107. color: transparent;
  108. text-shadow: 0 0 0 $text-color;
  109. }
  110. }
  111. &:after {
  112. position: absolute;
  113. top: 35%;
  114. right: $input-padding-x/2;
  115. background-color: transparent;
  116. color: $input-color;
  117. font: normal normal normal $font-size-sm/1 FontAwesome;
  118. content: '\f0d7';
  119. pointer-events: none;
  120. }
  121. }
  122. .gf-form-btn {
  123. padding: $input-padding-y $input-padding-x;
  124. line-height: $input-line-height;
  125. flex-shrink: 0;
  126. flex-grow: 0;
  127. }