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

@clayui/css: Custom Control group deprecated variables together #5485

Open
pat270 opened this issue Apr 21, 2023 · 3 comments
Open

@clayui/css: Custom Control group deprecated variables together #5485

pat270 opened this issue Apr 21, 2023 · 3 comments
Assignees
Labels
comp: clay-css Issues related to Clay CSS type: feature request Issues that are open to adding new features

Comments

@pat270
Copy link
Member

pat270 commented Apr 21, 2023

We have a lot of deprecated variables that we keep around for backward support. It's pretty hard to keep track of variables that are current under Clay. We should try and group them together as much as possible, ideally at the top of the file, but we have some variables that inherit un-deprecated variables which makes it hard. Here are some examples or deprecated variables:

/// @deprecated as of v2.2.1 use `$custom-control-indicator-checked-active-bg` instead
$custom-control-indicator-active-checked-bg: null !default;
$custom-control-indicator-checked-active-bg: $custom-control-indicator-active-checked-bg !default;
/// @deprecated as of v2.2.1 use `$custom-control-indicator-checked-active-border-color` instead
$custom-control-indicator-active-checked-border-color: null !default;
$custom-control-indicator-checked-active-border-color: $custom-control-indicator-active-checked-border-color !default;
/// @deprecated as of v2.2.1 use `$custom-control-indicator-checked-disabled-bg` instead
$custom-control-indicator-disabled-checked-bg: rgba($primary, 0.5) !default;
$custom-control-indicator-checked-disabled-bg: $custom-control-indicator-disabled-checked-bg !default;
/// @deprecated as of v2.2.1 use `$custom-control-indicator-checked-disabled-border-color` instead
$custom-control-indicator-disabled-checked-border-color: null !default;
$custom-control-indicator-checked-disabled-border-color: $custom-control-indicator-disabled-checked-border-color !default;

@pat270 pat270 added type: feature request Issues that are open to adding new features comp: clay-css Issues related to Clay CSS labels Apr 21, 2023
@ethib137
Copy link
Member

Yeah, this would be nice to have this cleaner. Would it be possible to have all the deprecated variables and even the compatibility-layer use of those deprecated variables in a separate _deprecated_variables.scss file? Something like:

_deprecated_variables.scss contains:

/// @deprecated as of v2.2.1 use `$custom-control-indicator-checked-active-border-color` instead 
  
 $custom-control-indicator-active-checked-border-color: null !default; 
 $custom-control-indicator-checked-active-border-color: $custom-control-indicator-active-checked-border-color !default; 

Then _custom-forms.scss could just contain the current variables:

 $custom-control-indicator-checked-active-border-color: null !default; 

It would be slightly more code, but would make it simpler to see the current variables that should be used. What do you think? Would there be a way to have this in separate files?

@matuzalemsteles
Copy link
Member

I like Evan's idea even to have visibility of the amount of things we keep for compatibility, I also think that we should already start planning Clay v4 to remove these compatibilities and clean up the CSS and also the components that we have many conditions for backwards compatibility.

@pat270 pat270 self-assigned this May 3, 2023
@liferay-platform-experience
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: clay-css Issues related to Clay CSS type: feature request Issues that are open to adding new features
Projects
None yet
Development

No branches or pull requests

4 participants