Skip to content

Commit

Permalink
adjust input and select margins to match state design
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomEtc committed Oct 1, 2023
1 parent 1a45b6b commit 7935ad6
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
11 changes: 5 additions & 6 deletions src/calculator-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ export const formTemplate = (
>${questionIcon(tooltipSize, tooltipSize)}</sl-tooltip
>
</label>
<br />
${select({
id: 'project',
required: true,
Expand All @@ -131,7 +130,7 @@ export const formTemplate = (
>${questionIcon(tooltipSize, tooltipSize)}</sl-tooltip
>
</label>
<br />
<input
tabindex="0"
id="zip"
Expand All @@ -155,7 +154,7 @@ export const formTemplate = (
>${questionIcon(tooltipSize, tooltipSize)}</sl-tooltip
>
</label>
<br />
${select({
id: 'owner_status',
required: true,
Expand All @@ -173,7 +172,7 @@ export const formTemplate = (
>${questionIcon(tooltipSize, tooltipSize)}</sl-tooltip
>
</label>
<br />
<ra-currency-input
id="household_income"
placeholder="$60,000"
Expand All @@ -198,7 +197,7 @@ export const formTemplate = (
${questionIcon(tooltipSize, tooltipSize)}</sl-tooltip
>
</label>
<br />
${select({
id: 'tax_filing',
required: true,
Expand All @@ -216,7 +215,7 @@ export const formTemplate = (
>${questionIcon(tooltipSize, tooltipSize)}</sl-tooltip
>
</label>
<br />
${select({
id: 'household_size',
required: true,
Expand Down
2 changes: 1 addition & 1 deletion src/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export const selectStyles = css`
background-color: var(--ra-select-background-color);
background-image: var(--ra-select-background-image);
margin-top: 4px;
margin: var(--ra-select-margin);
}
.select select[disabled] {
Expand Down
6 changes: 4 additions & 2 deletions src/state-incentive-details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ export const stateIncentivesStyles = css`
--ra-embed-card-border-radius: 0.75rem;
/* labels */
--ra-form-label-font-size: 11px;
--ra-form-label-line-height: 125%;
--ra-form-label-line-height: 20px;
--ra-form-label-font-weight: 700;
--ra-form-label-font-style: normal;
--ra-form-label-margin: 0;
--ra-form-label-margin: 0 0 8px 0;
--ra-form-label-text-transform: uppercase;
--ra-form-label-letter-spacing: 0.55px;
/* button */
Expand All @@ -28,9 +28,11 @@ export const stateIncentivesStyles = css`
--ra-select-border: 1px solid #E2E2E2;
--ra-select-focus-color: var(--rewiring-purple);
--ra-select-background-image: none;
--ra-select-margin: 0;
/* input */
--ra-input-border: 1px solid #E2E2E2;
--ra-input-focus-color: var(--rewiring-purple);
--ra-input-margin: 0;
}
Expand Down
3 changes: 3 additions & 0 deletions src/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,15 @@ export const baseStyles = css`
--ra-select-padding: 0.5rem 1rem;
--ra-select-arrow-color: #222;
--ra-select-focus-color: blue;
--ra-select-margin: 4px 0 0 0;
/* input styles */
--ra-input-border: 1px solid #cccccc;
--ra-input-focus-color: blue;
--ra-input-padding: 0.5rem 1rem;
--ra-input-font-size: var(--ra-embed-font-size);
--ra-input-line-height: var(--ra-embed-line-height);
--ra-input-border-radius: 4px;
--ra-input-margin: 4px 0 0 0;
}
:host {
Expand Down Expand Up @@ -119,6 +121,7 @@ export const baseStyles = css`
}
label {
display: block;
font-size: var(--ra-form-label-font-size);
line-height: var(--ra-form-label-line-height);
font-weight: var(--ra-form-label-font-weight);
Expand Down
4 changes: 1 addition & 3 deletions src/styles/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ export const inputStyles = css`
border: var(--ra-input-border);
border-radius: var(--ra-input-border-radius);
width: 100%;
margin-top: 4px;
margin-left: 0;
margin-right: 0;
margin: var(--ra-input-margin);
}
input:focus {
Expand Down

0 comments on commit 7935ad6

Please sign in to comment.