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

Can 1/3 and 1/2 cards not have a fixed height #1014

Closed
rosswintle opened this issue Nov 22, 2018 · 2 comments
Closed

Can 1/3 and 1/2 cards not have a fixed height #1014

rosswintle opened this issue Nov 22, 2018 · 2 comments
Milestone

Comments

@rosswintle
Copy link

  • Laravel Version: 5.6.39
  • Nova Version: 1.1.7
  • PHP Version: 7.1.8

Description:

Full-width cards can assume the height of their content. 1/2 and 1/3 width card are fixed at 150px.

Steps To Reproduce:

Task/Goal: Replace the "Help" card on the Nova dashboard with some introductory/welcome text of my own.

  • Create a new card and registered it in NovaServiceProvider's cards() method
  • In MyCard/src/MyCard.php I set public $width = 'full';
  • Create the card content in MyCard/resources/js/components/Card.vue
  • Compile with npm run watch in the card's directory
  • The card is fine, but now you decide you don't want it full-width, you want it narrower, so change public $width = 'full'; to public $width = '1/2';
  • Refresh the dashboard
  • Card content now overflows the card

The issue is that the 1/2 and 1/3 width cards have a card-panel class applied which is styled with a fixed height of 150px.

If the concern is that cards will look odd if they are different heights then we should use flexbox to fix this.

I see no reason why cards should be a fixed height.

@dillingham
Copy link
Contributor

.card-panel {
    height: auto !important;
    min-height: 150px;
}

@jbrooksuk jbrooksuk added this to the v1.0 milestone Aug 1, 2019
@jbrooksuk
Copy link
Member

This issue relates to an unsupported version of Nova. If you're still experiencing this in the latest version of Nova, please open a new ticket, thanks!

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

No branches or pull requests

3 participants