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

Allow Default theme reuse without background-clip #512

Closed
gyoshev opened this issue Dec 21, 2018 · 0 comments · Fixed by #995
Closed

Allow Default theme reuse without background-clip #512

gyoshev opened this issue Dec 21, 2018 · 0 comments · Fixed by #995
Assignees
Labels
Epic A non-trivial issue that resolves large-scale problems
Milestone

Comments

@gyoshev
Copy link
Contributor

gyoshev commented Dec 21, 2018

I'm submitting a...

  • Suggestion for improvement

Current behavior

The default theme uses background-clip: padding-box in a lot of places, which is subsequently reverted to border-box, due to telerik/kendo-theme-default#196. This makes it difficult to reuse the theme styles in derived themes, since these styles are not always necessary, but cannot be suppressed. Furthermore, these styles are sometimes the only difference between the default and a derived theme.

Expected behavior

Improved reuse of the theme CSS. The issue is marked as "Epic" not only because the code change involves the whole Default theme, but also because this can be leveraged to reuse the _theme.scss files in Bootstrap/Material as well.

Possible resoltion

Instead of outputting the property values directly, add a mixin that outputs them based on a variable. This will allow the background-clip styles to be suppressed in derived themes. For a rough example:

@mixin background-clip() {
  @if $use-background-clip {
    background-clip: padding-box;

    .k-edge { // etc
      background-clip: border-box;
    }
  }
}

// later
.k-button {
  @include background-clip();
}
@gyoshev gyoshev added Enhancement New feature of an existing functionality or an improvement of an existing functionality. Epic A non-trivial issue that resolves large-scale problems labels Dec 21, 2018
@joneff joneff self-assigned this Oct 22, 2019
@joneff joneff removed the Enhancement New feature of an existing functionality or an improvement of an existing functionality. label Dec 23, 2020
@joneff joneff added this to the 2020.1 milestone Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic A non-trivial issue that resolves large-scale problems
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants