Skip to content

ROU-13132: Make Submenu styling context-independent - #1308

Merged
BenOsodrac merged 2 commits into
devfrom
ROU-13132
Oct 19, 2026
Merged

BenOsodrac merged 2 commits into
devfrom
ROU-13132

Conversation

@BenOsodrac

Copy link
Copy Markdown
Contributor

The pill treatment for the Submenu header lived only under .app-menu-links, so a Submenu placed anywhere else fell back to the old underline look: no block padding, 2px transparent top/bottom borders, a primary underline on hover and on .active, and no background while open.

Hoist the pill onto the base .osui-submenu__header and drop the header-scoped copies, so the header renders identically wherever it sits: 8px/12px padding, 8px radius, bg-neutral-subtlest-hover on hover and while open, and no underline in any state.

  • New CSS API knobs: --osui-submenu-header-hover-background, -border-radius, -padding-block, -padding-inline.
  • BREAKING (CSS API): --osui-submenu-hover-border-color is removed — there is no hover border any more. --osui-submenu-active-border-color keeps its name although it now only paints text, to avoid a second break.
  • margin-inline: 0 added to the side-menu and tablet/phone header rules: the 1px pill gutter would push those full-width rows out of their column.

Verified with a block-level diff of every compiled submenu rule against a baseline build — the delta is exactly the intended rules. In-header and out-of-header headers measure identically (101x40, 8px/12px padding, 8px radius) in default, hover, open and selected.

Regenerating docs-ai/ and the Storybook CSS-API manifest also picks up pre-existing drift from earlier commits (Dropdown, Accordion, Range Slider, List Updating properties and a text-primary utility retarget) that was never regenerated.

Checklist

  • tested locally
  • documented the code
  • clean all warnings and errors of eslint
  • requires changes in OutSystems (if so, provide a module with changes)
  • requires new sample page in OutSystems (if so, provide a module with changes)

The pill treatment for the Submenu header lived only under
`.app-menu-links`, so a Submenu placed anywhere else fell back to the old
underline look: no block padding, 2px transparent top/bottom borders, a
primary underline on hover and on `.active`, and no background while open.

Hoist the pill onto the base `.osui-submenu__header` and drop the
header-scoped copies, so the header renders identically wherever it sits:
8px/12px padding, 8px radius, `bg-neutral-subtlest-hover` on hover and
while open, and no underline in any state.

- New CSS API knobs: `--osui-submenu-header-hover-background`,
  `-border-radius`, `-padding-block`, `-padding-inline`.
- BREAKING (CSS API): `--osui-submenu-hover-border-color` is removed —
  there is no hover border any more. `--osui-submenu-active-border-color`
  keeps its name although it now only paints text, to avoid a second break.
- `margin-inline: 0` added to the side-menu and tablet/phone header rules:
  the 1px pill gutter would push those full-width rows out of their column.

Verified with a block-level diff of every compiled `submenu` rule against a
baseline build — the delta is exactly the intended rules. In-header and
out-of-header headers measure identically (101x40, 8px/12px padding, 8px
radius) in default, hover, open and selected.

Regenerating `docs-ai/` and the Storybook CSS-API manifest also picks up
pre-existing drift from earlier commits (Dropdown, Accordion, Range Slider,
List Updating properties and a `text-primary` utility retarget) that was
never regenerated.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@BenOsodrac BenOsodrac added the bug Something isn't working label Oct 16, 2026
@BenOsodrac
BenOsodrac requested a review from a team as a code owner October 16, 2026 15:55
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

🖼️ Storybook: Chromatic UI tests result: ✅ Passed

Metric Value
Visual changes 2
Errors 0
Storybook Preview
Chromatic Build View Results

@os-davidlourenco os-davidlourenco left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM - There is still a problem with color in dark mode but I think it could be out of scope for this task

@BenOsodrac
BenOsodrac merged commit 02f106f into dev Oct 19, 2026
15 checks passed
@BenOsodrac
BenOsodrac deleted the ROU-13132 branch October 19, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants