feat: [content] allow disabling the `<section class="content">` wrapper
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
Research direction
The wrapper is hardcoded in packages/jaspr_content/lib/src/content.dart near line 33, so start there. Before coding, the maintainers need to pick an API shape (a flag on ContentApp, a PageConfig builder, or a ContentTheme option), which the thread has not settled. Done means an opt-out that leaves the default <section class="content"> output unchanged.
Written by the indexing model from the issue text.
Description
Description
jaspr_content's Content component wraps the rendered page in <section class="content"> (hardcoded in packages/jaspr_content/lib/src/content.dart). There's no way to disable or customize it. Three reasons this would help:
-
Semantic HTML.
<section>is sectioning content with implicit outline/landmark semantics, not a generic wrapper. MDN: "section should not be used as a generic container; this is what div is for." An unconditional outer section also affects the document outline and constrains content that uses its own sectioning elements (<article>, nested<section>,<aside>etc.). -
Cleaner markup. One extra wrapper with no ARIA or structured-data value.
-
CSS direct-child selectors break. Rules like
& > :first-childmatch the section, not the actual first content element:@utility prose-trimmed { & > :first-child { margin-top: 0; } & > :last-child { margin-bottom: 0; } }Applied to a parent of the section, this matches the section itself, not the heading inside.
Additional Context
Possible shapes:
- A bool parameter on
ContentApp(e.g.wrapWithContentSection: false). - A
PageConfigbuilder that returns the wrapping component, ornullto skip. - An option on
ContentTheme.
- Dominant language
- Dart
- Stars
- 2.5k
- Forks
- 328
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 27
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from schultek/jaspr
-
fix: jaspr serve keyboard shortcuts (r/R/l/d/q) don't work on WindowsPossibly taken @lewinpauli claimed this 1 day ago. Openbug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 3 days
-
fix: `Animation(count: double.infinity)` renders `infinity` instead of `infinite`May be free again A pull request for this issue was closed without being merged. Openbug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 3 days
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
schultek/jaspr#835 · 2 comments · 4 reactions ·
Maintainers usually reply within 3 days
-
fix: hot reload loses Dart changes when a second save triggers a rebuild while the first reload is still runningPossibly taken @lewinpauli claimed this 1 day ago. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
schultek/jaspr#961 · 1 comment ·
Maintainers usually reply within 3 days
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
Maintainers usually reply within 3 days
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Tencent/tdesign-flutter#1229 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
berkmancenter/frankly#732 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
rodydavis/signals.dart#510 ·
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
pentakoron1/brazier#33 ·
Maintainers usually reply within 1 day