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

[Card/CardContainer] styles updates - #71

Merged
katydecorah merged 4 commits into
masterfrom
cards-design
Dec 11, 2018
Merged

katydecorah merged 4 commits into
masterfrom
cards-design

Conversation

@katydecorah

@katydecorah katydecorah commented Dec 7, 2018 •

Copy link
Copy Markdown
Contributor

This PR makes a few subtle padding and style adjustments to Card and CardContainer.

Right now each card has padding that is revealed when hovered by the addition of a shadow. Unfortunately, this adds unused padding to the design and knocks the cards out of alignment with each heading:

image

The changes in this PR, removes the padding around each card and changes the hover interactive to a changing the card's hover text color blue:

image

I'd also like to make the images have rounded corners, but I suspect I'll need to PR the ability to pass props in https://github.com/mapbox/appropriate-images Nevermind! We can pass style to the element!

@colleenmcginnis colleenmcginnis left a comment

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.

This change is ok with me, but we should make sure we bump dr-ui versions in all docs repos at the same time to make sure this pattern is consistent across all examples pages.

const cardClasses = classnames('pb12 col col--12', {
'col--6-mm': !props.fullWidthCards
const cardClasses = classnames('col col--12 mb36', {
'col--6-ml': !props.fullWidthCards

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.

Do you think we need to adjust the width of the images we're using in the cards if we're breaking at ml instead of mm?

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.

@colleenmcginnis from what I can tell from my testing, I don't believe we'll need to adjust the width of the images. Since the images are being rendered as background images with a background-size: 100% they should continue to stretch to fit the container

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.

Oh! Yes. I was thinkin' if the widest the div can be is going to be wider than it is now, then we might want to bump the width we're using in places like here. We can wait and see if the images look pixely. 😝

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.

Aha! I think we should be ok considering most pages that use this component also have a sidebar which takes up a lot of real estate. It's unlikely that an image will stretch beyond 800px, but let's keep an eye on it.

@katydecorah

Copy link
Copy Markdown
Contributor Author

we should make sure we bump dr-ui versions in all docs repos at the same time to make sure this pattern is consistent across all examples pages

@colleenmcginnis that's a really good point, I'll add that as a to do on my end

Katy DeCorah added 2 commits December 11, 2018 09:20
* master:
  [ExamplesPage] remove pt60 class (#70)
@katydecorah
katydecorah merged commit 1fc36a3 into master Dec 11, 2018
@katydecorah
katydecorah deleted the cards-design branch December 11, 2018 14:23
katydecorah pushed a commit that referenced this pull request Dec 11, 2018
* master:
  [Card/CardContainer] styles updates (#71)
  [ExamplesPage] remove pt60 class (#70)
katydecorah pushed a commit that referenced this pull request Dec 11, 2018
* master:
  update dependencies
  Increments `Sticky` z-index (#67)
  [Card/CardContainer] styles updates (#71)
  [ExamplesPage] remove pt60 class (#70)
katydecorah pushed a commit that referenced this pull request Dec 11, 2018
* master:
  [SectionedNavigation] adds `hideSubItems` option (#69)
  update dependencies
  Increments `Sticky` z-index (#67)
  [Card/CardContainer] styles updates (#71)
  [ExamplesPage] remove pt60 class (#70)
@katydecorah katydecorah mentioned this pull request Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants