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 reverse-mobile-order block class #532

Open
swashbuck opened this issue Nov 6, 2024 · 6 comments
Open

Add reverse-mobile-order block class #532

swashbuck opened this issue Nov 6, 2024 · 6 comments

Comments

@swashbuck
Copy link
Contributor

swashbuck commented Nov 6, 2024

Subject of the enhancement

It would be useful to have a reverse-mobile-order block class that would work similarly to the reverse-desktop-order desktop class.

.block.reverse-mobile-order .component {
  @media (max-width: (@device-width-medium - 0.0625rem)) {
    &__container {
      flex-direction: column-reverse;
    }
  }
}
@oliverfoster
Copy link
Member

I don't think these maintain the tab order do they?

@swashbuck
Copy link
Contributor Author

swashbuck commented Nov 6, 2024

No, the reverse-desktop-order just changes the display order as far as I can tell. Not the DOM order.

I suppose a JSON option that changes the DOM order would be preferred here?

@oliverfoster
Copy link
Member

oliverfoster commented Nov 6, 2024

Hmm... _reverseChildrenOnDeviceSizes type thing?

Not quite sure what would be the best plan. NavigationView has a nice Dom sort algorithm https://github.com/adaptlearning/adapt-contrib-core/blob/89a0421ba06e127bfb0b5825a2bd7e839e06d49b/js/views/navigationView.js#L177

@oliverfoster
Copy link
Member

oliverfoster commented Nov 6, 2024

It might be a good idea to check that this is an issue with whoever wrote this CSS originally first?

adaptlearning/adapt_framework#2670

@swashbuck
Copy link
Contributor Author

Looks like @guywillis was involved with that one. Is there a reason we removed the ability to change the DOM order and instead use flexbox?

@guywillis
Copy link
Contributor

Clutching at memory straws but I think it ended up being simpler to do via a custom class than a json property.

I'm not opposed to returning to a json property as it's certainly more AAT friendly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants