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

Fluid centered container. #286

Merged
merged 10 commits into from
Jan 28, 2019
Merged

Fluid centered container. #286

merged 10 commits into from
Jan 28, 2019

Conversation

sherakama
Copy link
Member

READY FOR REVIEW

Summary

Needed By (Date)

  • Version 5?

Urgency

  • low

Steps to Test

  1. Check out this branch
  2. Compile styleguide
  3. Review centered container for flex and css grids

Associated Issues and/or People

See Also

max-width: $max-width - $gutter;
width: $max-width - $gutter;
} @else {
max-width: calc(100% - #{$gutter});
Copy link
Member

@yvonnetangsu yvonnetangsu Jan 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I believe the side "margin" values are different from the gutter values. These are the numbers I got from Figma (under Visual Guidelines -> Responsive Notes). John confirmed the numbers are for margin on each side so total subtraction would be below numbers x 2:
XS = 20px
SM = 30px
MD = 50px
LG = 80px
XL = 100px
XXL = max 1500px (doesn't use fluid margin since max-width is fixed to 1500px)

Looks like we might need another variable files also.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

screen shot 2019-01-23 at 3 09 19 pm

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I have adjusted the modular margin variable to match the margins provided here and updated the mixin to reflect that. Please have another review.

// 'md': 50px,
// 'lg': 80px,
// 'xl': 100px,
// '2xl': 150px,
// ) !default;
//
// Styleguide: Variables.Core.modular-spacing
//
$modular-spacing: (
Copy link
Member

@yvonnetangsu yvonnetangsu Jan 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The centered container is working great now. There's just one thing - I believe "margin" is a new variable that's different from and not related to the "modular spacing" variable. Added screenshot from Figma with the "modular spacing" values. Perhaps create a new variable for the margins?

image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the margins are only for the outside edge of a container to the browser window? We have three spacing models?

Do we have rules on when to apply each documented somewhere? I am confused by this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, that's my understanding from talking to John. The margins are completely on their own and aren't really used anywhere else. If I remember correctly, John and Kerri looked at some sites and adjusted the margin numbers until things looked the best for each break point.

I do agree that having 3 different spacing models can be confusing. Perhaps we could at least rethink the gutters in terms of modular spacing, eg, a XS gutter would be modular-scale(1) or something. Talk more in the Decanter meeting?

Copy link
Member

@yvonnetangsu yvonnetangsu Jan 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As for when to apply each - I don't think that's documented, but here's my understanding of it (from talking to John and working on homesite):

  1. margins - only for outside edge of centered container to browser window
  2. gutters - grid gutters, so naturally also become spacing between items that follows the "x number per row" model eg, cards.
  3. modular spacing - a unitless spacing system used for padding/margins within and between some items, eg, for things like vertical rhythm, card padding etc.

However, I believe that we can rewrite 1 and 2 in terms of 3.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this will make a good topic for Wednesday. I have refactored to put the screen edge margins into their own file. Generally, I am ok with these three spacing rules as long as we document them well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome - thanks, and I agree, we need to document these rules.

@yvonnetangsu
Copy link
Member

Perfecto 😸 Thanks!

@josephgknox
Copy link

Thank you two for the discussion and thorough review. I look forward to talking about this more, and working towards better documentation. This meets the design specs.

@sherakama
Copy link
Member Author

I'll create a new ticket to add the figma documentation about the spacing rules to the decanter site.

@josephgknox
Copy link

josephgknox commented Jan 28, 2019

@sherakama @yvonnetangsu do we want to hold off on merging until Wednesday's broader discussion, or are we OK proceeding with a merge now?

@yvonnetangsu
Copy link
Member

@sherakama @yvonnetangsu do we want to hold off on merging until Wednesday broader discussion, or are we OK proceeding with a merge now?

I vote yes on merging now. @sherakama ?

@sherakama
Copy link
Member Author

Yeah, we can merge and talk about the documentation/simplification on Wednesday. Go ahead and pull the trigger.

@josephgknox
Copy link

Trigger being pulled.

@josephgknox josephgknox merged commit c32e444 into master Jan 28, 2019
@josephgknox josephgknox deleted the DEC-281 branch January 28, 2019 19:55
@josephgknox
Copy link

Good work, team!

yvonnetangsu added a commit that referenced this pull request Jan 29, 2019
* master:
  Fluid centered container. (#286)
  188 Button Tweak (#287)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants