Skip to content

Feat/refactor list styling#80

Open
Yannicvanveen wants to merge 10 commits intomainfrom
feat/refactor-list-styling
Open

Feat/refactor list styling#80
Yannicvanveen wants to merge 10 commits intomainfrom
feat/refactor-list-styling

Conversation

@Yannicvanveen
Copy link
Copy Markdown
Contributor

@Yannicvanveen Yannicvanveen commented Mar 24, 2026

Tailwind Preflight reset lijsten standaard, dus geen markers, margin en padding. Onze list styling wordt toegepast op alle lijsten, waardoor we het werk van de reset ongedaan maken en op veel plekken list-none, m-0 en pl-0 classes gebruiken om de lijst styling nogmaals ongedaan te maken.

Deze PR scoped de échte lijst styling binnen de .wp-block-list class en verwijdert alle handmatige resets op andere plekken in de code.

In sommige gevallen komen lijsten die wel markers moeten hebben niet uit het Gutenberg block, bijvoorbeeld omdat content uit een ander CMS is geïmporteerd. In dat soort gevallen zou de selecter uitgebreid kunnen worden o.b.v. een specifieke class, bijvoorbeeld .wysiwyg-content :is(ol, ul).

Screenshot 2026-03-24 at 15 05 12

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors how list styling is applied across the Sage theme by scoping “styled lists” to Gutenberg list blocks, and removing now-unnecessary list reset classes from navigation and UI lists.

Changes:

  • Scope list spacing/indent/marker styles to .wp-block-list (instead of all ul/ol) and introduce shared use-block-spacing utility.
  • Remove list-none/padding/margin reset classes from menu markup and related component CSS where global list styling previously forced overrides.
  • Simplify editor block style registration (buttons only) and drop the custom core/list “unstyled” block style registration.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
web/app/themes/sage/resources/views/sections/footer.blade.php Removes list reset classes from footer nav menu markup.
web/app/themes/sage/resources/views/components/meta/list.blade.php Removes list reset classes from the meta list component.
web/app/themes/sage/resources/views/components/layout/index.blade.php Removes breadcrumb list reset classes; adjusts formatting/indentation.
web/app/themes/sage/resources/views/components/header/top-bar.blade.php Removes list reset classes from top-bar menu markup; formatting change.
web/app/themes/sage/resources/views/components/header/navigation.blade.php Removes list reset classes from primary nav menu markup.
web/app/themes/sage/resources/views/components/header/mobile-menu.blade.php Removes list reset classes from mobile menu markup.
web/app/themes/sage/resources/styles/elements/lists.css Replaces global ul/ol styling with .wp-block-list-scoped styling using CSS variables.
web/app/themes/sage/resources/styles/components/nav.css Removes list reset utilities from .sub-menu styling.
web/app/themes/sage/resources/styles/components/mobile-menu.css Removes list reset utilities from mobile submenu styling.
web/app/themes/sage/resources/styles/blocks/timeline/shared.css Removes list-none from timeline collapse summary styling.
web/app/themes/sage/resources/styles/base/utilities.css Adds @utility use-block-spacing for consistent block spacing behavior.
web/app/themes/sage/resources/scripts/editor/block-styles.js Registers button block styles via forEach; removes list block style registration.
Comments suppressed due to low confidence (1)

web/app/themes/sage/resources/styles/blocks/timeline/shared.css:58

  • Removing list-none from the summary element can reintroduce the default disclosure marker in non-WebKit browsers (e.g., Firefox). Currently only ::-webkit-details-marker is hidden, so consider restoring list-style: none (or hiding ::marker) to keep the marker consistently hidden across browsers.
.wp-block-yard-timeline-item-collapse__summary {
	@apply relative min-h-8 cursor-pointer pr-10;

	&::-webkit-details-marker {
		@apply hidden;
	}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants