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

Add angled carousel component #146

Merged
merged 1 commit into from
Feb 8, 2018
Merged

Add angled carousel component #146

merged 1 commit into from
Feb 8, 2018

Conversation

nabaroa
Copy link

@nabaroa nabaroa commented Jan 26, 2018

This is a custom angled design for the carousel. The design offers a pleasant experience to slide large images and a caption or call to action related to them.
This design shows a different version on tablets/mobiles, more appropriate for small devices.
The styles are added to the basic carousel ones.

It is working on: https://transferwise.com/gb/compare/

image

Copy link

@StevePole StevePole left a comment

Choose a reason for hiding this comment

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

Looks pretty good, a few questions inline. Did you work with Julian on the implementation? I had previously handled the wide screen issues this way: https://codepen.io/stevepole/pen/NvGzwM but either can work.

@@ -0,0 +1,183 @@
@media (min-width: 992px) {

Choose a reason for hiding this comment

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

Why do we need all of these styles for the docs?

Copy link
Author

Choose a reason for hiding this comment

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

Removed. Not needed since the custom styles are added already.

h3,
h4,
h5,
h6 {

Choose a reason for hiding this comment

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

If we need these we should add the utility classes as well (.h1, .h2, .h3 etc). Although I wonder why these are necessary?

Copy link
Author

Choose a reason for hiding this comment

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

Default carousel.less have this styles:

  h1, h2, h3, h4, h5, h6 {
      color: @carousel-caption-color;
  }

These ones in the angled version change the default white colour. They're not necessary but they're useful since the background of the caption is also white.


.carousel-caption-item {
width: 100%;
padding: 0 (@spacer * 4);

Choose a reason for hiding this comment

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

Perhaps this padding should be responsive? 32px quite large on mobile.

font-size: 0.88em;
}

.circle {

Choose a reason for hiding this comment

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

Not sure this should be part of the styles as it's quite specific to your use case, perhaps better to use hidden-xs, hidden-sm, hidden-md to hide it for your implementation?

}

li {
width: @spacer;

Choose a reason for hiding this comment

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

Slightly surprised these styles aren't on something clickable (e.g. an anchor or button), often styling the li container can make a mismatch in clickable area.

Copy link
Author

Choose a reason for hiding this comment

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

Agree. This is the original bootstrap carousel indicator markup and tried to maintain it.

@nabaroa
Copy link
Author

nabaroa commented Feb 2, 2018

Yes, I catched up with Julian about the animation and the behaviour of the caption.

@nabaroa nabaroa force-pushed the carousel-redesign branch 2 times, most recently from d3aa5af to 86c05c1 Compare February 5, 2018 12:36
@nabaroa nabaroa merged commit 00cbb15 into master Feb 8, 2018
@nabaroa nabaroa deleted the carousel-redesign branch February 8, 2018 13:02
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.

None yet

2 participants