_gf-form.scss 2.8 KB

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