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

chore(components): remove usage of utility classes in post-header #4358

Merged
merged 2 commits into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/breezy-poets-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-components': patch
---

Removed the dependency on utility classes in `post-header` component. The header can now be used without importing CSS utility classes.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ slot[name='post-logo'] {
.title-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--post-core-dimension-4);
height: var(--main-header-height);
background: var(--post-core-color-brand-white);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,7 @@ export class PostHeader {
</div>
</div>
<div
class={
'title-header d-flex space-between align-center ' +
(this.mobileMenuExtended ? 'title-header-mobile-extended' : '')
}
class={'title-header ' + (this.mobileMenuExtended ? 'title-header-mobile-extended' : '')}
>
<slot name="title"></slot>
<div class="global-sub">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,8 @@ post-mainnavigation {
}
}
}

.back-button .btn {
padding-inline: 0;
}
}
6 changes: 3 additions & 3 deletions packages/components/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ <h1 slot="title">Application title</h1>

<!-- Main navigation -->
<post-mainnavigation caption="Hauptnavigation">
<button type="button" slot="back-button" class="btn btn-sm btn-tertiary p-0">
<button type="button" slot="back-button" class="btn btn-sm btn-tertiary">
<post-icon aria-hidden="true" name="3024"></post-icon> Back
</button>

Expand All @@ -82,7 +82,7 @@ <h2>Main Navigation</h2>
<post-list-item>
<post-megadropdown-trigger for="briefe">Briefe</post-megadropdown-trigger>
<post-megadropdown id="briefe">
<button slot="back-button" class="btn btn-tertiary px-0">
<button slot="back-button" class="btn btn-tertiary">
<post-icon name="arrowright"></post-icon>
Zurück
</button>
Expand All @@ -107,7 +107,7 @@ <h3><a href="/schritt-für-schritt">Schritt für Schritt</a></h3>
<post-list-item>
<post-megadropdown-trigger for="pakete">Pakete</post-megadropdown-trigger>
<post-megadropdown id="pakete">
<button slot="back-button" class="btn btn-tertiary px-0">
<button slot="back-button" class="btn btn-tertiary">
<post-icon name="arrowright"></post-icon>
Zurück
</button>
Expand Down
Loading