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

Add aditional CSS custom variable on radial elements for user customization. #14

Closed
tinchox5 opened this issue Aug 30, 2024 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@tinchox5
Copy link
Member

tinchox5 commented Aug 30, 2024

Orbit uses CSS transform property to arrange its radial elements. But in some cases users mat need to use this property. So, It may be great to add a CSS var at the end of transform. Something like --o-extra. Remember que transform is Chainable.

Origninal code in satellite:

 --o-transform: translate(
    calc(
      (var(--o-radius) - var(--o-aligment, 0px))  / var(--o-ellipse-x) *
        cos(var(--o-from) + var(--o-angle-composite ))
    ),
    calc(
      (var(--o-radius) - var(--o-aligment, 0px))  / var(--o-ellipse-y) *
        sin(var(--o-from) + var(--o-angle-composite))
    )
  );
  transform: var(--o-transform);

Proposal code:

 --o-transform: translate(
    calc(
      (var(--o-radius) - var(--o-aligment, 0px))  / var(--o-ellipse-x) *
        cos(var(--o-from) + var(--o-angle-composite ))
    ),
    calc(
      (var(--o-radius) - var(--o-aligment, 0px))  / var(--o-ellipse-y) *
        sin(var(--o-from) + var(--o-angle-composite))
    )
  );
  transform: var(--o-transform) var(--o-extra);
@tinchox5 tinchox5 added the enhancement New feature or request label Aug 30, 2024
@tinchox5 tinchox5 added this to the next release milestone Oct 4, 2024
@tinchox5
Copy link
Member Author

tinchox5 commented Oct 4, 2024

  transform: var(--o-transform) var(--o-transform-custom, rotate(0deg));

This enhancement will be applied just on satellites, --o-transform-custom will have a rotate(0deg) fallback that no produces any layout change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant