Closed (fixed)
Project:
Commerce Core
Version:
8.x-2.x-dev
Component:
Checkout
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
13 May 2016 at 17:55 UTC
Updated:
27 Jun 2016 at 18:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
amberbam commentedI styled the 'Returning Customer' and 'Guest Checkout' panes on this page to be displayed side by side rather than stacked, also made responsive. Needs review.
Comment #3
rszrama commentedHmm, I opened the screenshot in my browser and resized - it didn't seem to adjust to the screen size. Might need to double check the responsive CSS.
(I jest. ; )
Comment #4
agoradesign commentedomg... please do not include too much pre-styled elements und make too much assumptions on frontend layouts in Commerce itself. Imho that was and is one of the big strengths of Drupal and 99% of its contrib modules in comparison to any other CMS, that you don't have to constantly override pre-defined CSS code, that you simply don't need at all in your theme. That's horrible.
What makes sense, is that the themer has an easy chance to override a template, and e.g. place the two elements inside Bootstrap/Foundation columns or any other element, he/she wishes...
Comment #5
mglamanagoradesign,
While I agree that minimal CSS is good, amberbam is from Acro who we are encouraging to provide good default stylings.
Drupal 8's library system makes it very easy to override or remove a library. If we keep these specific changes in their own library it is easy to remove them, unlike in D7 which had the epic hook_css_alter.
It would be safe to say 99% of people would expect these to be side-by-side.
What browsers support calc()?
Comment #6
mglamanFollow up: Instead of
calccan't we use flexbox here?Comment #7
amberbam commentedHey mglaman,
We can definitely use flexbox if you think that's better! I checked out caniuse.com and it says calc() is fully supported in all modern browsers except for Opera Mini.. which doesn't really matter in this case since the style is applied to 850px and above. It's also supported in IE9 except for when used as background position value. Flexbox isn't fully supported in IE11 - "Partial support is due to large amount of bugs present (see known issues)", and it's not supported in IE9 or below. Another option would be just giving them a width of 45% and floating them left and right?
Cheers
Comment #8
mglamanLet's just do the simple 45%/float, use the desktop media query in the product form (follow core patterns.)
Comment #9
amberbam commentedI've updated the CSS so that the Returning Customer and Guest Checkout panes have a width of 48% and are floated left and right. Also updated the media query to have a min-width of 851px to match the Bartik theme, which can easily be edited or removed by themers.
Comment #10
amberbam commentedWhoops! Just noticed your comment mglaman about following core patterns for the media query. So I've changed it to 780px now.
Comment #11
mglamanAssigning to myself for a bit to review
Comment #12
mglamanAlso, PR for good measure https://github.com/drupalcommerce/commerce/pull/401
Comment #13
mglamanAttaching gif of work in action. Works well with Bartik out of the box.
Comment #14
mglamanHere is also an edge case example where someone enables the order summary. Still works out, even better so if left sidebar is removed.
Comment #15
mglamanPerhaps we should provide an extra class of
form-wrapper__login-optionthat simplifies the duplicate CSS declarations. I think when that is done, this is a thumbs up.Comment #16
amberbam commentedThanks mglaman! I've added the form-wrapper__login-option class and got rid of the duplicate selectors in CSS.
Comment #17
mglamanMoving to RTBC. This is +1, just waiting for Travis to greenlight commit for #2742205: Port commerce_cart tests to BrowserTest.
Comment #19
mglamanThanks for all the work! Committed.