Skip to content

Added horizontal scroll mixin#2458

Merged
cchaos merged 9 commits intoelastic:masterfrom
cchaos:horizontal-scroll-mixin
Oct 24, 2019
Merged

Added horizontal scroll mixin#2458
cchaos merged 9 commits intoelastic:masterfrom
cchaos:horizontal-scroll-mixin

Conversation

@cchaos
Copy link
Copy Markdown
Contributor

@cchaos cchaos commented Oct 21, 2019

Fixes #2215

This new mixin euiXScrollWithShadows and utility class .euiXScrollWithShadows compliment the already existing mixin euiYScrollWithShadows and utility class .euiYScrollWithShadows.

Screen Shot 2019-10-21 at 16 46 29 PM

Screen Shot 2019-10-21 at 16 44 32 PM

Checklist

  • Checked in dark mode
  • Checked in mobile
  • Checked in IE11 and Firefox (IE doesn't support masks, and we're ok with no fallback)
  • [ ] Props have proper autodocs
  • Added documentation examples
  • [ ] Added or updated jest tests
  • [ ] Checked for breaking changes and labeled appropriately
  • [ ] Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

@cchaos cchaos requested a review from elizabetdev October 21, 2019 20:51
Copy link
Copy Markdown
Contributor

@elizabetdev elizabetdev left a comment

Choose a reason for hiding this comment

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

LGTM! I just add one small suggestion.

Copy link
Copy Markdown
Contributor

@snide snide left a comment

Choose a reason for hiding this comment

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

Loaded locally, checked the docs and code.

} @else if ($direction == 'x') {
mask-image: linear-gradient(to right, #{$gradient});
} @else {
@warn "euiOverflowShadow() expects direction to be 'y' or 'x' but got '#{$direction}'";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👏

@include euiYScrollWithShadows;
}

.euiXScrollWithShadows {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I know it looks like we did this in the other one, but the rest of our utilities were written eui-. Wish these two weren't off pattern.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We could also use a dual selector for now, and deprecate the other one. Obviously not a big deal, just something I noticed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah so I also looked into the docs and the docs referenced this as .eui-yScrollWithShadows. I think at some point there was a bad merge that undid the change from .euiYScrollWithShadows to .eui-yScrollWithShadows. I then opted for the non-dash one, but for no particular reason but to not break that selector. I can setup a deprecation though instead.

@cchaos cchaos requested a review from snide October 22, 2019 18:02
Copy link
Copy Markdown
Contributor

@snide snide left a comment

Choose a reason for hiding this comment

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

I'm sorry, I missed the rerequest for review on this one! LGTM.

@cchaos cchaos force-pushed the horizontal-scroll-mixin branch from f4ac48f to 5974565 Compare October 24, 2019 20:43
@cchaos cchaos force-pushed the horizontal-scroll-mixin branch from 5974565 to 010f631 Compare October 24, 2019 20:45
@cchaos cchaos merged commit 95f60b3 into elastic:master Oct 24, 2019
@cchaos cchaos deleted the horizontal-scroll-mixin branch October 24, 2019 21:01
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.

Create overflow horizontal sass mixin

3 participants