Skip to content

Commit

Permalink
specify padding and margin
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicmacaulay committed Jan 30, 2025
1 parent ba51274 commit ff14fee
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/components/form.css
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
width: 100%;
min-width: var(--__op-form-control-height);
height: var(--__op-form-control-height);
padding: var(--op-space-2x-small) var(--op-space-x-small) var(--op-space-2x-small) var(--op-space-small);
border: none;
border-radius: var(--op-radius-medium);
appearance: none;
Expand All @@ -94,6 +93,10 @@
cursor: text;
font-size: var(--__op-form-control-font-size);
line-height: var(--op-line-height-base);
padding-block: var(--op-space-2x-small);
padding-inline-end: var(--op-space-x-small);
/* stylelint-disable-next-line declaration-block-no-redundant-longhand-properties */
padding-inline-start: var(--op-space-small);

/* Focus State */
&:focus,
Expand Down Expand Up @@ -161,7 +164,6 @@
min-height: var(--__op-btn-height);
align-items: center;
justify-content: center;
padding: 0 var(--op-space-x-small);
border: none;
border-radius: var(--op-radius-medium);
appearance: none;
Expand All @@ -173,6 +175,8 @@
font-weight: var(--op-font-weight-normal);
gap: var(--op-space-x-small);
margin-block: calc((var(--__op-form-control-height) / 2) - (var(--__op-btn-height) / 2));
padding-block: 0;
padding-inline: var(--op-space-x-small);
text-align: center;
text-decoration: none;
transition: var(--op-transition-input);
Expand All @@ -185,7 +189,6 @@
}

select.form-control:not([multiple], [type='radio'], [type='checkbox']) {
padding-right: var(--op-space-3x-large);
appearance: none;
background-image: var(--op-encoded-images-dropdown-arrow);
background-position: center right;
Expand All @@ -194,6 +197,7 @@ select.form-control:not([multiple], [type='radio'], [type='checkbox']) {
);
background-repeat: no-repeat;
cursor: pointer;
padding-inline-end: var(--op-space-3x-large);
}

select.form-control[multiple] {
Expand Down Expand Up @@ -229,27 +233,28 @@ textarea.form-control:not([type='radio'], [type='checkbox']) {
.form-error-summary {
padding: var(--op-space-large);
border-radius: var(--op-radius-large);
margin-bottom: var(--op-space-large);
background-color: var(--op-color-alerts-danger-plus-seven);
box-shadow: var(--op-border-all) var(--op-color-alerts-danger-on-plus-seven);
color: var(--op-color-alerts-danger-on-plus-seven);
margin-block-end: var(--op-space-large);

h2 {
font-size: var(--op-font-medium);
}

ul {
margin-bottom: 0;
margin-block-end: 0;
}
}

.form-group {
display: grid;
align-content: baseline;
padding: var(--op-space-small) 0;
gap: var(--op-space-x-small);
grid-auto-rows: auto;
grid-template-columns: auto 1fr;
padding-block: var(--op-space-small) 0;
padding-inline: 0;

/* Group Alignment */
/* stylelint-disable no-descending-specificity */
Expand Down

0 comments on commit ff14fee

Please sign in to comment.