Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

fix(layout): allow flex-offset to be a child of layout-margin #11330

Merged
merged 1 commit into from
Jun 22, 2018
Merged

fix(layout): allow flex-offset to be a child of layout-margin #11330

merged 1 commit into from
Jun 22, 2018

Conversation

bersLucas
Copy link
Contributor

Adds .layout-margin to the layout-offset selector for more specificity

Fixes #11328

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?

[x] Bugfix
[ ] 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?

The CSS class .layout-margin overwrites the margin-left declaration from .flex-offset-*, so it doesn't get offset to the right.

Issue Number: #11328

What is the new behavior?

.flex-offset now includes .layout-margin in it's CSS selector to increase specificity and not have it's margin overwritten by .layout-margin when it is a child of .layout-margin

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@googlebot googlebot added the cla: no PR author needs to sign Google's CLA: https://opensource.google.com/docs/cla/ label Jun 18, 2018
@bersLucas
Copy link
Contributor Author

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ and removed cla: no PR author needs to sign Google's CLA: https://opensource.google.com/docs/cla/ labels Jun 18, 2018
Copy link
Member

@Splaktar Splaktar left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! It looks good other than the one space issue that I mentioned.

@@ -45,7 +45,7 @@
@if $s != '' { $suffix : '#{$s}-#{$i * 5}'; }
@else { $suffix : '#{$i * 5}'; }

$offsets : '.offset-#{$suffix}, .flex-offset-#{$suffix}';
$offsets : '.offset-#{$suffix}, .flex-offset-#{$suffix}, .layout-margin .flex-offset-#{$suffix}, .layout-margin .offset-#{$suffix}';
Copy link
Member

Choose a reason for hiding this comment

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

It looks like the extra space at the start of the line breaks the alignment of the code here? Can you please remove that one space?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 6e4b733

@Splaktar Splaktar self-assigned this Jun 18, 2018
@Splaktar Splaktar added this to the 1.1.10 milestone Jun 18, 2018
@Splaktar Splaktar added type: bug in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs P4: minor Minor issues. May not be fixed without community contributions. ui: layout ui: CSS labels Jun 18, 2018
Copy link
Member

@Splaktar Splaktar left a comment

Choose a reason for hiding this comment

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

LGTM

@Splaktar Splaktar added pr: merge ready This PR is ready for a caretaker to review pr: lgtm This PR has been approved by the reviewer and removed in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs labels Jun 18, 2018
@jelbourn jelbourn merged commit 81eb46f into angular:master Jun 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ P4: minor Minor issues. May not be fixed without community contributions. pr: lgtm This PR has been approved by the reviewer pr: merge ready This PR is ready for a caretaker to review type: bug ui: CSS ui: layout
Projects
None yet
Development

Successfully merging this pull request may close these issues.

layout: flex-offset does not work as a child of layout-margin
4 participants