-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Make tables responsive #74
Comments
@waldyrious This sounds like a good idea, particularly since some frameworks may have different definitions of what "responsiveness" means. Someone would need to go through each framework and assess it according to some fixed set of criteria (e.g., presence of horizontal scroll, media elements resized or not, accessibility on mobile etc). Once that data has been collected we could easily add it to the Readme to help people choose between frameworks. |
@dohliam it seems like you're speaking about the dropin-minimal-css project. It would be great to have a responsiveness assessment for all stylesheets listed there, but to be clear, this issue is specifically about validating the responsiveness of downstyler itself :) |
Whoops, you're right! |
So, the Fluidity-inspired rules do indeed cover the max-width for images and other embedded media, but not the wide tables. I've submitted #80 to help test possible improvements to that. |
I'll retitle this issue so that it reflects the current status, and to make it more actionable. |
Ok, so it seems that setting tables to There are two improvements that could be done to this: First, showing a shadow when there's scrolling to do, so that it's more evident that there's scrollable content; and second, letting wide tables break out of the width-constrained main column (see Layout Breakouts with CSS Grid). Here's one way to do it, which is called "Pop & Plop" in the Thinking on ways to solve CENTERING video: table {
position: relative;
left: 50%;
transform: translate(-50%);
} In fact, we could apply this centering + breakout strategy to all tables; those narrower than the container width would be centered horizontally with left & right margins, which is an acceptable default IMO. This would allow tables to stretch past the container width, while still allowing them to scroll when they reach the viewport width: table {
position: relative;
left: 50%;
transform: translate(-50%);
display: block;
overflow: auto;
width: fit-content;
max-width: calc(100vw - 2em);
} There's what the result looks like:
Seems promising. Once I add the scrolling shadow effect mentioned above, I'm thinking it might be a good idea to go ahead and do it. However, this may be problematic for pages that use tables for layout (#18). |
See a detailed description of the (potential) issue here. The rulesets adapted from Fluidity may already cover this, but it wold be good to actually confirm that.
The text was updated successfully, but these errors were encountered: