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

refactor(Accordion): use CSS logical properties instead of physical values #1130

Merged
merged 7 commits into from
Jul 18, 2024

Conversation

Cata1989
Copy link
Collaborator

@Cata1989 Cata1989 commented Jun 25, 2024

Description

This PR aims to modernize the CSS by incorporating logical properties for improved adaptability and support for RTL content direction and vertical layout.

We have implemented CSS animation for the summary HTML element using block-size and calc-size (still in draft). If calc-size is supported:

CleanShot 2024-07-17 at 11 39 09@2x

the open/close animation will be handled via CSS instead of JavaScript. This enhances considerably the way the animation behaves on a vertical layout.

If calc-size() is not yet supported by the browser (feature flag is not enabled) animations will be handled via JavaScript, and, if there's a need for a vertical layout, we have added the possibility to disable all animation so the component works as expected, without shifting when opening or closing.

Related Issue

N/A

Documentation

Screenshots (if applicable)

CleanShot.2024-07-17.at.16.40.23.mp4

Checklist

  • I have read the CONTRIBUTING document.
  • I have read the CODE OF CONDUCT document.
  • I have reviewed my own code.
  • I have tested the changes locally.
  • I have updated the documentation (if applicable).
  • I have added unit tests and e2e tests (if applicable).
  • I have requested reviews from relevant team members.

Additional Notes

@Cata1989 Cata1989 force-pushed the refactor/accordion-logical-properties branch from df2c201 to 4ce51bb Compare June 25, 2024 10:20
@Cata1989 Cata1989 force-pushed the refactor/accordion-logical-properties branch from 374ec5f to 269c65e Compare June 25, 2024 11:11
@Cata1989 Cata1989 force-pushed the refactor/accordion-logical-properties branch from 269c65e to fbf956e Compare July 8, 2024 14:52
@dgonzalezr dgonzalezr force-pushed the refactor/accordion-logical-properties branch from fbf956e to 6309cc4 Compare July 17, 2024 07:48
@dgonzalezr dgonzalezr self-assigned this Jul 17, 2024
@dgonzalezr dgonzalezr added the refactor 🧑🏼‍🔧 When something have been changed but the main scope/functionality remains label Jul 17, 2024
dgonzalezr
dgonzalezr previously approved these changes Jul 17, 2024
dgonzalezr
dgonzalezr previously approved these changes Jul 17, 2024
endv-bogdanb
endv-bogdanb previously approved these changes Jul 18, 2024
@dgonzalezr dgonzalezr dismissed stale reviews from endv-bogdanb and themself via db06845 July 18, 2024 09:55
Copy link

@dgonzalezr dgonzalezr merged commit ebc2ad6 into main Jul 18, 2024
6 checks passed
@dgonzalezr dgonzalezr deleted the refactor/accordion-logical-properties branch July 18, 2024 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor 🧑🏼‍🔧 When something have been changed but the main scope/functionality remains
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants