-
Notifications
You must be signed in to change notification settings - Fork 12
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
Align with start instead of center #88
Conversation
I'd like to request a review from https://github.com/Taeir but I can't enter that in the reviewers list. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmn, presumably yes. I wonder what the best way of doing that is though; should I create the utility class in co-design and then if that gets merged in create a new pull request on qpixel to add that class to the score? |
It's not just a need to be more specific. The layout is also width dependent. So there are 2 separate questions to consider:
The example @Taeir gives also applies to real Codidact question lists. If you resize the page to be narrow enough (or view on mobile) then the vote counts switch to be horizontal rather than vertical. Currently they are horizontally centered in this narrow view, but this pull request causes them to no longer be horizontally centered. A CSS media query (line 76 in the same file It still might be useful to have a more specific CSS selector though: The example is fine on a narrow page (unaffected by ticking or unticking The example loses the vertical centering for answers and votes on a wider page (most desktop screens): In this case it is quite a subtle difference in the vertical positioning of the answer count and vote count (easier to see in the highlighted row), but I guess still probably to be avoided? |
@trichoplax For what it's worth, the mobile view is off-center even now, due to the text being to the side. (The co-design website's examples are presumably a couple years out of date, given that they are completely different from qpixel proper.) |
Ah I see. I was thinking of that as already centered because there is equal empty space on both sides. It hadn't occurred to me that it should be the text that is centered, with the bar moved left to accommodate this. Would it be easier to raise a separate issue / meta post to see if people would prefer centering the bar and text together, or just the text? If that's going to be addressed separately then we could match current behaviour in the meantime by adding the following at line 104: justify-content: center; |
To be honest I think having the text to the side of the horizontal bar looks off regardless due to vertical height differences and such. Generally speaking the mobile view has quite a few problems with it that should probably get fixed at some point.... |
Resolves codidact/qpixel#1007