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

MOON-472: Add border radius variables for selectors #470

Merged
merged 4 commits into from
Jan 2, 2025
Merged

Conversation

Eevolee
Copy link
Contributor

@Eevolee Eevolee commented Dec 30, 2024

JIRA

https://jira.jahia.org/browse/MOON-472

Description

Add globals --selector-border-radius & --selector-border-radius_big

@Eevolee Eevolee requested a review from ffffffelix December 30, 2024 15:50
@@ -1,6 +1,8 @@
@forward '../colors/colors';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed it last time, but I guess you don't need to import colors.

border-radius: 4px;
border-radius: var(--selector-border-radius_big);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All selectors should have the same border radius, especially EmptyCardSelector and CardSelector . So you can use the same than CardSelector.

Comment on lines 4 to 5
--selector-border-radius: 2px;
--selector-border-radius_big: 4px;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can go further and always manage all border-radius with variables. I propose:

--radius: 4px;
--radius_selector: 2px;
--radius_rounded: 2rem;

This naming is not perfect because it mixes the style rounded and the usage selector, but I hope it will be easier to understand when to use each variables.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I proposed to replace --selector-border-radius with --radius_selector and --selector-border-radius_big with --radius and add --radius_rounded. Not adding more variables.

In that case, we would have something more generic, and we could use those variables for all components, not only selectors with a shorter naming.

@ffffffelix ffffffelix added the patch Increment the patch version when merged label Dec 30, 2024
@Eevolee Eevolee requested a review from ffffffelix December 30, 2024 16:49
Comment on lines 4 to 5
--selector-border-radius: 2px;
--selector-border-radius_big: 4px;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I proposed to replace --selector-border-radius with --radius_selector and --selector-border-radius_big with --radius and add --radius_rounded. Not adding more variables.

In that case, we would have something more generic, and we could use those variables for all components, not only selectors with a shorter naming.

@Eevolee Eevolee requested a review from ffffffelix January 2, 2025 09:48
@Eevolee Eevolee merged commit 53bd93b into develop Jan 2, 2025
3 checks passed
@Eevolee Eevolee deleted the MOON-472 branch January 2, 2025 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants