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

fix(gutter): update mobile gutter spacing in layouts that have gutters #1829

Merged
merged 2 commits into from
May 21, 2019

Conversation

mcoker
Copy link
Contributor

@mcoker mcoker commented May 16, 2019

fixes #1822

@patternfly-build
Copy link

patternfly-build commented May 16, 2019

Deploy preview for pf-next ready!

Built with commit 6c47de9

https://deploy-preview-1829--pf-next.netlify.com

@@ -86,6 +86,7 @@

// Gutter
--pf-global--gutter: #{$pf-global--gutter};
--pf-global--gutter--md: #{$pf-global--gutter--md};
Copy link
Member

Choose a reason for hiding this comment

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

In the documentation I think it would be worth noting the spacer size that the gutter uses and then how it changes on a medium breakpoint.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You think this should be in the layouts' documents, or somewhere else?

Copy link
Member

Choose a reason for hiding this comment

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

For example here in the Gallery Layout. "Adds space between children" is a little too broad and I think it would help if the consumer knew what size gutter was being applied.

Screen Shot 2019-05-20 at 2 19 36 PM

Copy link
Member

Choose a reason for hiding this comment

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

You may need to add it to every layout that uses the gutter

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you have in mind for documentation that? Not to say we shouldn't, but we don't really document spacing values currently. And if we update the value of the spacing, it would be good if we don't have to update every component/layout that uses it. I wonder if we could say it uses the globally defined gutter value and generally matches the gutters used for sections in the page layout?

Copy link
Member

Choose a reason for hiding this comment

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

Ok yeah I get that we don't want to explicitly state the size but I think this will help to inform the user:
"Adds space between children by using the globally defined gutter value"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good! done.

@@ -134,6 +134,7 @@ $pf-global--spacer--form-element: pf-size-prem(6px) !default;

// Gutter
$pf-global--gutter: $pf-global--spacer--lg !default;
$pf-global--gutter--md: $pf-global--spacer--md !default;
Copy link
Member

Choose a reason for hiding this comment

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

Are you naming this variable by the breakpoint that it relates to? IMO when i first glance at the variable it seems like its a larger version of the default variable which could be confusing for users since it really is smaller. I wonder if it should be named with sm because its a smaller version of the gutter, in the case that the variable is used elsewhere when it doesnt relate to a breakpoint? I think most of the variables in here are named based on size over breakpoint, but let me know your reasoning :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not by the breakpoint - I'm using --md as the modifier to represent "medium" since that's the size spacer it maps to. I wondered about this, too. The way I see it, gutters are similar to our spacing system, but they are used in a different context. We could potentially have gutters that map 1:1 with our spacers. So I think having gutter names that match the spacer names makes sense. In this case, I'm going off the assumption that pf-global--gutter is the same as pf-global--gutter--lg, so pf-global--gutter--md is pf-global--spacer--md, pf-global--gutter--sm would map to pf-global--spacer--sm, etc. If they don't match, I think that's confusing, and if we decided to have a gutter that matched pf-global--spacer--xs, we would need to create pf-global--gutter--xxs.

Copy link
Member

Choose a reason for hiding this comment

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

Ok great that makes sense and I like that approach

@christiemolloy christiemolloy merged commit c3e5690 into patternfly:master May 21, 2019
@patternfly-build
Copy link

🎉 This PR is included in version 2.6.16 🎉

The release is available on:

Your semantic-release bot 📦🚀

srambach referenced this pull request in mcoker/patternfly-next May 28, 2019
…s (#1829)

* fix(gutter): update mobile gutter spacing in layouts that have gutters
@mcoker mcoker deleted the issue-1822 branch December 16, 2019 22:49
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