Skip to content

Commit

Permalink
superhero: fix floating label input height, closes #1292
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaspark committed Jan 25, 2024
1 parent b3acacf commit 36b93e9
Show file tree
Hide file tree
Showing 14 changed files with 116 additions and 118 deletions.
1 change: 0 additions & 1 deletion dist/superhero/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ $input-disabled-bg: $gray-100 !default;

$input-color: $gray-900 !default;
$input-border-color: transparent !default;
$input-border-width: 0 !default;

$input-placeholder-color: $gray-500 !default;

Expand Down
52 changes: 26 additions & 26 deletions dist/superhero/bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*!
* Bootswatch v5.3.2 (https://bootswatch.com)
* Theme: superhero
* Copyright 2012-2023 Thomas Park
* Copyright 2012-2024 Thomas Park
* Licensed under MIT
* Based on Bootstrap
*/
Expand Down Expand Up @@ -2096,22 +2096,22 @@ progress {
}

.col-form-label {
padding-top: 0.375rem;
padding-bottom: 0.375rem;
padding-top: calc(0.375rem + var(--bs-border-width));
padding-bottom: calc(0.375rem + var(--bs-border-width));
margin-bottom: 0;
font-size: inherit;
line-height: 1.5;
}

.col-form-label-lg {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
padding-top: calc(0.5rem + var(--bs-border-width));
padding-bottom: calc(0.5rem + var(--bs-border-width));
font-size: 1.25rem;
}

.col-form-label-sm {
padding-top: 0.25rem;
padding-bottom: 0.25rem;
padding-top: calc(0.25rem + var(--bs-border-width));
padding-bottom: calc(0.25rem + var(--bs-border-width));
font-size: 0.875rem;
}

Expand All @@ -2134,7 +2134,7 @@ progress {
appearance: none;
background-color: #fff;
background-clip: padding-box;
border: 0 solid transparent;
border: var(--bs-border-width) solid transparent;
border-radius: var(--bs-border-radius);
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
Expand Down Expand Up @@ -2189,7 +2189,7 @@ progress {
border-color: inherit;
border-style: solid;
border-width: 0;
border-inline-end-width: 0;
border-inline-end-width: var(--bs-border-width);
border-radius: 0;
-webkit-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
Expand All @@ -2205,7 +2205,7 @@ progress {
border-color: inherit;
border-style: solid;
border-width: 0;
border-inline-end-width: 0;
border-inline-end-width: var(--bs-border-width);
border-radius: 0;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
Expand Down Expand Up @@ -2234,7 +2234,7 @@ progress {
color: var(--bs-body-color);
background-color: transparent;
border: solid transparent;
border-width: 0 0;
border-width: var(--bs-border-width) 0;
}
.form-control-plaintext:focus {
outline: 0;
Expand All @@ -2245,7 +2245,7 @@ progress {
}

.form-control-sm {
min-height: calc(1.5em + 0.5rem + calc(0 * 2));
min-height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2));
padding: 0.25rem 0.5rem;
font-size: 0.875rem;
border-radius: var(--bs-border-radius-sm);
Expand All @@ -2264,7 +2264,7 @@ progress {
}

.form-control-lg {
min-height: calc(1.5em + 1rem + calc(0 * 2));
min-height: calc(1.5em + 1rem + calc(var(--bs-border-width) * 2));
padding: 0.5rem 1rem;
font-size: 1.25rem;
border-radius: var(--bs-border-radius-lg);
Expand All @@ -2283,18 +2283,18 @@ progress {
}

textarea.form-control {
min-height: calc(1.5em + 0.75rem + calc(0 * 2));
min-height: calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2));
}
textarea.form-control-sm {
min-height: calc(1.5em + 0.5rem + calc(0 * 2));
min-height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2));
}
textarea.form-control-lg {
min-height: calc(1.5em + 1rem + calc(0 * 2));
min-height: calc(1.5em + 1rem + calc(var(--bs-border-width) * 2));
}

.form-control-color {
width: 3rem;
height: calc(1.5em + 0.75rem + calc(0 * 2));
height: calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2));
padding: 0.375rem;
}
.form-control-color:not(:disabled):not([readonly]) {
Expand All @@ -2309,10 +2309,10 @@ textarea.form-control-lg {
border-radius: var(--bs-border-radius);
}
.form-control-color.form-control-sm {
height: calc(1.5em + 0.5rem + calc(0 * 2));
height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2));
}
.form-control-color.form-control-lg {
height: calc(1.5em + 1rem + calc(0 * 2));
height: calc(1.5em + 1rem + calc(var(--bs-border-width) * 2));
}

.form-select {
Expand All @@ -2332,7 +2332,7 @@ textarea.form-control-lg {
background-repeat: no-repeat;
background-position: right 0.75rem center;
background-size: 16px 12px;
border: 0 solid transparent;
border: var(--bs-border-width) solid transparent;
border-radius: var(--bs-border-radius);
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
Expand Down Expand Up @@ -2609,8 +2609,8 @@ textarea.form-control-lg {
.form-floating > .form-control,
.form-floating > .form-control-plaintext,
.form-floating > .form-select {
height: calc(3.5rem + calc(0 * 2));
min-height: calc(3.5rem + calc(0 * 2));
height: calc(3.5rem + calc(var(--bs-border-width) * 2));
min-height: calc(3.5rem + calc(var(--bs-border-width) * 2));
line-height: 1.25;
}
.form-floating > label {
Expand All @@ -2625,7 +2625,7 @@ textarea.form-control-lg {
text-overflow: ellipsis;
white-space: nowrap;
pointer-events: none;
border: 0 solid transparent;
border: var(--bs-border-width) solid transparent;
transform-origin: 0 0;
transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
}
Expand Down Expand Up @@ -2701,7 +2701,7 @@ textarea.form-control-lg {
transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}
.form-floating > .form-control-plaintext ~ label {
border-width: 0 0;
border-width: var(--bs-border-width) 0;
}
.form-floating > :disabled ~ label,
.form-floating > .form-control:disabled ~ label {
Expand Down Expand Up @@ -2751,7 +2751,7 @@ textarea.form-control-lg {
text-align: center;
white-space: nowrap;
background-color: #4e5d6c;
border: 0 solid transparent;
border: var(--bs-border-width) solid transparent;
border-radius: var(--bs-border-radius);
}

Expand Down Expand Up @@ -2793,7 +2793,7 @@ textarea.form-control-lg {
border-bottom-right-radius: 0;
}
.input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
margin-left: calc(0 * -1);
margin-left: calc(var(--bs-border-width) * -1);
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
Expand Down
4 changes: 2 additions & 2 deletions dist/superhero/bootstrap.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/superhero/bootstrap.min.css.map

Large diffs are not rendered by default.

52 changes: 26 additions & 26 deletions dist/superhero/bootstrap.rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*!
* Bootswatch v5.3.2 (https://bootswatch.com)
* Theme: superhero
* Copyright 2012-2023 Thomas Park
* Copyright 2012-2024 Thomas Park
* Licensed under MIT
* Based on Bootstrap
*/
Expand Down Expand Up @@ -2094,22 +2094,22 @@ progress {
}

.col-form-label {
padding-top: 0.375rem;
padding-bottom: 0.375rem;
padding-top: calc(0.375rem + var(--bs-border-width));
padding-bottom: calc(0.375rem + var(--bs-border-width));
margin-bottom: 0;
font-size: inherit;
line-height: 1.5;
}

.col-form-label-lg {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
padding-top: calc(0.5rem + var(--bs-border-width));
padding-bottom: calc(0.5rem + var(--bs-border-width));
font-size: 1.25rem;
}

.col-form-label-sm {
padding-top: 0.25rem;
padding-bottom: 0.25rem;
padding-top: calc(0.25rem + var(--bs-border-width));
padding-bottom: calc(0.25rem + var(--bs-border-width));
font-size: 0.875rem;
}

Expand All @@ -2132,7 +2132,7 @@ progress {
appearance: none;
background-color: #fff;
background-clip: padding-box;
border: 0 solid transparent;
border: var(--bs-border-width) solid transparent;
border-radius: var(--bs-border-radius);
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
Expand Down Expand Up @@ -2187,7 +2187,7 @@ progress {
border-color: inherit;
border-style: solid;
border-width: 0;
border-inline-end-width: 0;
border-inline-end-width: var(--bs-border-width);
border-radius: 0;
-webkit-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
Expand All @@ -2203,7 +2203,7 @@ progress {
border-color: inherit;
border-style: solid;
border-width: 0;
border-inline-end-width: 0;
border-inline-end-width: var(--bs-border-width);
border-radius: 0;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
Expand Down Expand Up @@ -2232,7 +2232,7 @@ progress {
color: var(--bs-body-color);
background-color: transparent;
border: solid transparent;
border-width: 0 0;
border-width: var(--bs-border-width) 0;
}
.form-control-plaintext:focus {
outline: 0;
Expand All @@ -2243,7 +2243,7 @@ progress {
}

.form-control-sm {
min-height: calc(1.5em + 0.5rem + calc(0 * 2));
min-height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2));
padding: 0.25rem 0.5rem;
font-size: 0.875rem;
border-radius: var(--bs-border-radius-sm);
Expand All @@ -2262,7 +2262,7 @@ progress {
}

.form-control-lg {
min-height: calc(1.5em + 1rem + calc(0 * 2));
min-height: calc(1.5em + 1rem + calc(var(--bs-border-width) * 2));
padding: 0.5rem 1rem;
font-size: 1.25rem;
border-radius: var(--bs-border-radius-lg);
Expand All @@ -2281,18 +2281,18 @@ progress {
}

textarea.form-control {
min-height: calc(1.5em + 0.75rem + calc(0 * 2));
min-height: calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2));
}
textarea.form-control-sm {
min-height: calc(1.5em + 0.5rem + calc(0 * 2));
min-height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2));
}
textarea.form-control-lg {
min-height: calc(1.5em + 1rem + calc(0 * 2));
min-height: calc(1.5em + 1rem + calc(var(--bs-border-width) * 2));
}

.form-control-color {
width: 3rem;
height: calc(1.5em + 0.75rem + calc(0 * 2));
height: calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2));
padding: 0.375rem;
}
.form-control-color:not(:disabled):not([readonly]) {
Expand All @@ -2307,10 +2307,10 @@ textarea.form-control-lg {
border-radius: var(--bs-border-radius);
}
.form-control-color.form-control-sm {
height: calc(1.5em + 0.5rem + calc(0 * 2));
height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2));
}
.form-control-color.form-control-lg {
height: calc(1.5em + 1rem + calc(0 * 2));
height: calc(1.5em + 1rem + calc(var(--bs-border-width) * 2));
}

.form-select {
Expand All @@ -2330,7 +2330,7 @@ textarea.form-control-lg {
background-repeat: no-repeat;
background-position: left 0.75rem center;
background-size: 16px 12px;
border: 0 solid transparent;
border: var(--bs-border-width) solid transparent;
border-radius: var(--bs-border-radius);
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
Expand Down Expand Up @@ -2607,8 +2607,8 @@ textarea.form-control-lg {
.form-floating > .form-control,
.form-floating > .form-control-plaintext,
.form-floating > .form-select {
height: calc(3.5rem + calc(0 * 2));
min-height: calc(3.5rem + calc(0 * 2));
height: calc(3.5rem + calc(var(--bs-border-width) * 2));
min-height: calc(3.5rem + calc(var(--bs-border-width) * 2));
line-height: 1.25;
}
.form-floating > label {
Expand All @@ -2623,7 +2623,7 @@ textarea.form-control-lg {
text-overflow: ellipsis;
white-space: nowrap;
pointer-events: none;
border: 0 solid transparent;
border: var(--bs-border-width) solid transparent;
transform-origin: 100% 0;
transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
}
Expand Down Expand Up @@ -2699,7 +2699,7 @@ textarea.form-control-lg {
transform: scale(0.85) translateY(-0.5rem) translateX(-0.15rem);
}
.form-floating > .form-control-plaintext ~ label {
border-width: 0 0;
border-width: var(--bs-border-width) 0;
}
.form-floating > :disabled ~ label,
.form-floating > .form-control:disabled ~ label {
Expand Down Expand Up @@ -2749,7 +2749,7 @@ textarea.form-control-lg {
text-align: center;
white-space: nowrap;
background-color: #4e5d6c;
border: 0 solid transparent;
border: var(--bs-border-width) solid transparent;
border-radius: var(--bs-border-radius);
}

Expand Down Expand Up @@ -2791,7 +2791,7 @@ textarea.form-control-lg {
border-bottom-left-radius: 0;
}
.input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
margin-right: calc(0 * -1);
margin-right: calc(var(--bs-border-width) * -1);
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
Expand Down
4 changes: 2 additions & 2 deletions dist/superhero/bootstrap.rtl.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/superhero/bootstrap.rtl.min.css.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/5/superhero/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ $input-disabled-bg: $gray-100 !default;

$input-color: $gray-900 !default;
$input-border-color: transparent !default;
$input-border-width: 0 !default;

$input-placeholder-color: $gray-500 !default;

Expand Down
Loading

0 comments on commit 36b93e9

Please sign in to comment.