Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

feat(layouts): add @mixin for responsive support for rows #11981

Merged
merged 1 commit into from
Jul 27, 2020

Conversation

Splaktar
Copy link
Contributor

@Splaktar Splaktar commented Jul 27, 2020

PR Checklist

Please check that your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added or this is not a bug fix / enhancement
  • Docs have been added, updated, or were not required

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Enhancement
[ ] Documentation content changes
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Dividers don't render properly when inside of an element with layout="column"
Screen Shot 2020-07-27 at 14 49 44

Issue Number:
Fixes #9112. Closes #9220.

What is the new behavior?

Creates @mixin that only triggers when in row configuration.

  • Dividers now properly display in dynamic layout directions.
  • Radio Buttons bottom margins are now properly removed when
    in row configuration.
  • Input, Select, Radio Buttons and Checkboxes automatically
    add 16px horizontal margin in front of the element
    when in a row and not the first item.

Previous implementations could not properly detect row configuration
where a layout would change direction based on media breakpoints.

Does this PR introduce a breaking change?

[x] Yes
[ ] No

BREAKING CHANGE: The way that margins are applied to md-checkbox, md-input-container, md-radio-group, and md-select has been changed. You can now use the $default-horizontal-margin Sass variable to override the default 16px horizontal margin size. As part of this, md-radio-buttons inside of layout="row" containers are now aligned vertically with other content as they no longer have a 16px margin-bottom. If you have previously added custom styles, to your components inside of a row layout, in order to give them extra margin-right in LTR or margin-left in RTL, you will need to re-evaluate those styles. In most cases, they can now be removed.

Other information

With these changes:
Screen Shot 2020-07-27 at 14 50 10

Creates `@mixin` that only triggers when in row configuration.

 - Dividers now properly display in dynamic layout directions.
 - Radio Buttons bottom margins are now properly removed when
   in row configuration.
 - Input, Select, Radio Buttons and Checkboxes automatically
   add 16px horizontal margin in front of the element
   when in a row and not the first item.

Previous implementations could not properly detect row configuration
where a layout would change direction based on media breakpoints.

Fixes #9112. Closes #9220.

BREAKING CHANGE: The way that margins are applied to `md-checkbox`, `md-input-container`, `md-radio-group`, and `md-select` has been changed. You can now use the `$default-horizontal-margin` Sass variable to override the default `16px` horizontal margin size. As part of this, `md-radio-button`s inside of `layout="row"` containers are now aligned vertically with other content as they no longer have a `16px` `margin-bottom`. If you have previously added custom styles, to your components inside of a row layout, in order to give them extra `margin-right` in LTR or `margin-left` in RTL, you will need to re-evaluate those styles. In most cases, they can now be removed.
@googlebot
Copy link

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added the cla: no PR author needs to sign Google's CLA: https://opensource.google.com/docs/cla/ label Jul 27, 2020
@Splaktar Splaktar self-assigned this Jul 27, 2020
@Splaktar Splaktar added this to the 1.2.0 milestone Jul 27, 2020
@Splaktar
Copy link
Contributor Author

@clshortfuse can you please add your @googlebot I consent. here?

Caretaker: you can find the previous consent and commit in PR #9220.

@Splaktar Splaktar added pr: lgtm This PR has been approved by the reviewer pr: merge ready This PR is ready for a caretaker to review labels Jul 27, 2020
@Splaktar Splaktar merged commit c2c336b into master Jul 27, 2020
@Splaktar Splaktar deleted the layout-whenRowMixing branch July 27, 2020 23:26
@clshortfuse
Copy link
Contributor

@googlebot I consent.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
- Breaking Change cla: no PR author needs to sign Google's CLA: https://opensource.google.com/docs/cla/ CSS: High Density P2: required Issues that must be fixed. pr: lgtm This PR has been approved by the reviewer pr: merge ready This PR is ready for a caretaker to review ui: layout
Projects
None yet
Development

Successfully merging this pull request may close these issues.

divider: responsive layouts are not properly supported
4 participants