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

fix(kslideout): title and content styles #1773

Conversation

kleinfreund
Copy link
Contributor

@kleinfreund kleinfreund commented Oct 17, 2023

(Branched off of the work for #1770 so targeting that PR’s branch for now)

Summary

This PR mainly aims at reducing the need to override some of KSlideout’s default styles by making the layout a bit more consistent and adjusting the spacing between certain elements.

fix(kslideout): overriding KCard padding

Removes the custom padding override of .kong-card so that the content area has the same padding as KCard.

fix(kslideout): title styles

Addresses a number of style issues of the title bar in order to achieve a better default appearance.

Removes the margins added to the title, before title, and after title containers and instead adds a padding to the header making the title bar appear flush with the content.

Reduces the gap size between title, before title, and after title to allow for more flexible usage scenarios.

Signed-off-by: Philipp Rudloff philipp.rudloff@konghq.com

Notes

  • Markup changes: I’m changing the markup of the component here which might interfere with the development efforts that are on-going for Kongponents v9, but this depends on whether there are plans to change this component much in that process. Let me know, happy to make changes.
  • Before/after title slot usage: I’d like to hear about current use cases for the before/after title slots as I’m making changes to how those are spaced-out in the header.

The overrides we currently find ourselves using (with Kongponents v8) without these changes:

.k-slideout {
  // Overrides KSlideout’s override so the padding is the same as that of KCard.
  --KCardPaddingX: #{$kui-space-80} !important;
  --KCardPaddingY: #{$kui-space-80} !important;
}

.k-slideout-header-content {
  padding-right: $kui-space-80;
  padding-left: $kui-space-80;
}

Screenshots

Before:

image

After:

image

PR Checklist

  • Conventional Commits all commits follow the conventional commit standards outlined in the main README.
  • Tests coverage: test coverage was added for new features and bug fixes
  • Docs: includes a technically accurate README

Philipp Rudloff added 4 commits October 17, 2023 10:57
Adds support for an optional `title` slot so that additional markup can be used in titles (e.g. a link). The slot takes priority over the prop.

Signed-off-by: Philipp Rudloff <philipp.rudloff@konghq.com>
Signed-off-by: Philipp Rudloff <philipp.rudloff@konghq.com>
Removes the custom padding override of `.kong-card` so that the content area has the same padding as KCard.

Signed-off-by: Philipp Rudloff <philipp.rudloff@konghq.com>
Addresses a number of style issues of the title bar in order to achieve a better default appearance.

Removes the margins added to the title, before title, and after title containers and instead adds a padding to the header making the title bar appear flush with the content.

Reduces the gap size between title, before title, and after title to allow for more flexible usage scenarios.

Signed-off-by: Philipp Rudloff <philipp.rudloff@konghq.com>
@kleinfreund
Copy link
Contributor Author

Closing this as it was superseded by #2012.

@kleinfreund kleinfreund deleted the fix/kslideout-title-and-content-styles branch February 28, 2024 11:35
@kleinfreund kleinfreund removed their assignment Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants