Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drawer item title margin offsets item alignment #486

Closed
kirsty-hames opened this issue Jan 17, 2024 · 0 comments · Fixed by #487
Closed

Drawer item title margin offsets item alignment #486

kirsty-hames opened this issue Jan 17, 2024 · 0 comments · Fixed by #487
Assignees

Comments

@kirsty-hames
Copy link
Contributor

kirsty-hames commented Jan 17, 2024

Subject of the issue

Margin is applied to .drawer__item-title which is inherited by all drawer plugins. However, most plugin items only contain a title so the margin isn't required. It's a minor issue but the addition of margin does offset the position making the title display off-center vertically.

Looking at the existing drawer views (Resources, PageLevelProgress, Glossary, LanguagePicker and initial drawer view when multiple plugins are installed), margin is only needed when .drawer__item-title is followed by .drawer__item-body.

PageLevelProgress:
plp

Resources:
resources

Glossary:
glossary

Expected behaviour

Only apply margin when .drawer__item-title is followed by .drawer__item-body.

As a suggestion, the margin could be applied to the.drawer__item-body instead.

For example:

.drawer {
  &__item-title {
    .drawer-item-title;
    text-align: start;
  }

  &__item-body {
    margin-top: @drawer-title-margin;
    margin-bottom: @drawer-body-margin;
    .drawer-item-body;
    text-align: start;
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant