Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/components/c-form--login.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/components/c-form.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/components/django-cms-forms.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-styles.base.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/trumps/s-form--login.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/trumps/s-form.css

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions src/lib/_imports/components/c-form--login.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,6 @@
display: none;
}

/* To make elements bigger */
& :--form__field:not(:--form__field--has-checkbox) {
/* To stretch input field width */
display: flex;
flex-direction: column;
}
Comment on lines -68 to -73
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added in #225, but as the wrong solution to a specificity problem.

/* To always use larger field inputs (not just on coarse pointer devices) */
& input {
padding: 12px 12px; /* mimic Core Styles forms.css @media (pointer: coarse) */
Expand Down
3 changes: 3 additions & 0 deletions src/lib/_imports/components/c-form.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@

:--form__field {
margin-bottom: 2rem; /* mimic <p> `margin-bottom` */

display: flex;
flex-direction: column;
Comment on lines +42 to +43
Copy link
Copy Markdown
Member Author

@wesleyboar wesleyboar Nov 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All form fields, Portal or CMS, checkbox or not, should be stretched. Whether the <input> itslef is stretched, is managed by styles specific to certain <input> fields.

}

:--form__field--has-checkbox {
Expand Down
13 changes: 3 additions & 10 deletions src/lib/_imports/components/django-cms-forms.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@
/* SEE ../components/c-form.css */
/* SEE: ../tools/selectors.form.css */

@custom-selector :--cms-form__field--no-checkbox
.field-wrapper:where(:not(.checkboxinput));

:--cms-form__field--no-checkbox {
display: flex;
flex-direction: column;
width: max-content;
}
:--cms-form__field--no-checkbox > .field-errors { order: 1; }
:--cms-form__field--no-checkbox > .help-text { order: 2; }
/* To ensure */
:--cms-form__field > :--cms-form__errors { order: 1; }
:--cms-form__field > :--cms-form__help { order: 2; }