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

[Feature Request] Access responsive content in card via a slot #10982

Closed
sts-ryan-holton opened this issue Mar 31, 2020 · 2 comments
Closed

[Feature Request] Access responsive content in card via a slot #10982

sts-ryan-holton opened this issue Mar 31, 2020 · 2 comments
Assignees
Milestone

Comments

@sts-ryan-holton
Copy link

Problem to solve

I'm trying to add some custom CSS to the .v-responsive__content element within the Vuetify JS card component. I've looked online and can't seem to find a slot for this, I need to set the z-index value of this element manually as I'm using a ::before on the v-card component to add a background overlay.

I'm having some troubles with targeting this, can someone help/advise?

Proposed solution

My code is as follows, and I believe a proposed solution should allow me to change the content slot so that I can add custom CSS to adjust the z-index:

<v-card
  class="mx-auto mb-8"
  max-width="375"
>
  <v-img
    class="white--text align-end"
    height="200"
    :src="source"
  >
    <v-card-title class="pb-0 mb-n1">Title</v-card-title>
    <v-row>
      <v-col cols="8">
        <v-card-subtitle class="white--text text-truncate py-0">Subtitle</v-card-subtitle>
      </v-col>
      <v-col class="text-right">
        <v-chip
          class="chip-custom chip-custom--primary ma-0 mr-4 mt-n2"
          color="primary"
          text-color="white"
          small
        >
          text
          <v-icon right small class="ml-1">mdi-star</v-icon>
        </v-chip>
      </v-col>
    </v-row>
  </v-img>
</v-card>
@ghost ghost added the S: triage label Mar 31, 2020
@johnleider
Copy link
Member

I recently talked to @KaelWD about this. I commonly want to use it as well. In other components we use the content-class prop, or maybe we can remove the inner element, I'll leave that up to @KaelWD

@johnleider johnleider added the C: VImg VImg label Apr 4, 2020
@Leespiker Leespiker added T: feature A new feature and removed S: triage labels Apr 11, 2020
@johnleider johnleider added C: VResponsive VResponsive V3: Phase 1 and removed C: VImg VImg labels Dec 3, 2020
@johnleider johnleider added this to the v3.0.0 milestone Dec 3, 2020
@johnleider johnleider added this to To do in Vuetify 3 - Titan via automation Dec 3, 2020
@johnleider johnleider added the C: VImg VImg label Dec 9, 2020
@johnleider johnleider modified the milestones: v3.0.0, v2.4.0 Dec 9, 2020
@KaelWD
Copy link
Member

KaelWD commented Dec 9, 2020

I'm having some troubles with targeting this, can someone help/advise?

If you're using scoped styles you need a deep selector to target elements in a child component.

KaelWD added a commit that referenced this issue Dec 9, 2020
@KaelWD KaelWD closed this as completed Dec 9, 2020
Vuetify 3 - Titan automation moved this from To do to Done Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

4 participants