Skip to content

Commit 70d3f28

Browse files
committed
fix: tup-659 simplify solution
No need to avoid stretching fieldw rapper that has a checkbox. A checkbox (and others) are already explicitely told not to stretch.
1 parent 05f6f32 commit 70d3f28

File tree

11 files changed

+11
-25
lines changed

11 files changed

+11
-25
lines changed

dist/components/c-form.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/components/django-cms-forms.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/core-styles.base.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/trumps/s-form.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/_imports/components/c-form.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,10 @@
3838

3939
:--form__field {
4040
margin-bottom: 2rem; /* mimic <p> `margin-bottom` */
41-
}
4241

43-
:--form__field--not-checkbox {
4442
display: flex;
4543
flex-direction: column;
4644
}
47-
:--form__field--not-checkbox > :--form__errors { order: 1; }
48-
:--form__field--not-checkbox > :--form__help { order: 2; }
4945

5046
:--form__field--has-checkbox {
5147
display: inline-grid;

src/lib/_imports/components/c-form.selectors.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
:--c-form__field.has-required;
2424
@custom-selector :--c-form__field--has-checkbox
2525
:--c-form__field.has-type-check;
26-
@custom-selector :--c-form__field--not-checkbox
27-
:--c-form__field:where(:not(.has-type-check));
2826

2927
@custom-selector :--c-form__menu
3028
.c-form__field > :where(ul:not(.c-form__errors), menu);
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
/* FAQ: c-form.css styles s-form and django-cms-forms */
2-
@import url("./c-form.css");
3-
@import url("./c-form--cms.css");
4-
52
@import url("./django-cms-forms.hacks.css");
63
@import url("./django-cms-forms.selectors.css");
74

8-
/* No other styles necessary, because c-form supports s-form selectors */
5+
/* Few other styles necessary, because c-form supports s-form selectors */
96
/* SEE ../components/c-form.css */
107
/* SEE: ../tools/selectors.form.css */
118

12-
:--cms-form__field--not-checkbox {
13-
width: max-content;
14-
}
9+
/* To ensure */
10+
:--cms-form__field > :--cms-form__errors { order: 1; }
11+
:--cms-form__field > :--cms-form__help { order: 2; }

src/lib/_imports/components/django-cms-forms.selectors.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
:--cms-form__field.required;
2222
@custom-selector :--cms-form__field--has-checkbox
2323
:--cms-form__field.checkboxinput;
24-
@custom-selector :--cms-form__field--not-checkbox
25-
:--cms-form__field:where(:not(.checkboxinput));
2624

2725
@custom-selector :--cms-form__menu
2826
:where(.radioselect, .checkboxselectmultiple);

src/lib/_imports/components/django-cms-forms/config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
label: Django CMS Forms
22
status: ready
33
context:
4+
📝 supportStyles: only needed until core-styles.cms.css loads them
5+
supportStyles:
6+
- ../../assets/components/django-cms-forms.css
47
shouldLoadCMS: true
58
📝 shouldLoadCMS: because this is demo but this is CMS pattern
69
markup:

src/lib/_imports/tools/selectors.form.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@
4747
:--c-form__field--has-checkbox,
4848
:--s-form__field--has-checkbox,
4949
:--cms-form__field--has-checkbox;
50-
@custom-selector :--form__field--not-checkbox
51-
:--c-form__field--not-checkbox,
52-
:--s-form__field--not-checkbox,
53-
:--cms-form__field--not-checkbox;
5450

5551
@custom-selector :--form__menu
5652
:--c-form__menu,

0 commit comments

Comments
 (0)