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

Improvement in responsible tables #21

Open
lsarni opened this issue Oct 13, 2017 · 2 comments
Open

Improvement in responsible tables #21

lsarni opened this issue Oct 13, 2017 · 2 comments

Comments

@lsarni
Copy link
Contributor

lsarni commented Oct 13, 2017

I feel like the current behaviour of the tables on mobile isn't ideal.

Normal:
image

Mobile
image

This makes it really hard to read, especially if the column values aren't as obvious as this example.

I feel something like this will make a lot more sense (taken form here):
image

Or just showing the column name next to the value could be enough.

@caiotarifa
Copy link
Member

Hi, @lsarni.

Do you have an idea how to do this without JavaScript?

If JavaScript is the only way, we can work on a separate library for this purpose.

@lsarni
Copy link
Contributor Author

lsarni commented Oct 24, 2017

There is this codepen, I built a workaround for my case based on that but it's too hacky.

column do
  "<span class='column-title'>#{day}:</span><span class='common'> #{order.meal.menu.name}</span>".html_safe
end
#attributes_table_arbre_html_menu {
  .column-title {
    display: none !important;
  }
}

@media only screen and (max-width: 767px) {
  #attributes_table_arbre_html_menu {
    .column-title {
      display: inline !important;
      text-decoration: underline;
    }
  }
}

Web:
image

Mobile:
image

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

No branches or pull requests

2 participants