Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

99
Views
vue.js mode for css

I have this BaseComponent used and configures in another component as followed:

<BaseTitle
      v-slot="{ highlightClass }"
      :color="mode === 'faq' ? 'dark' : 'secondary'"
      v-bind="__titleProps"
      :text-uppercase="mode === 'incentive'"
      highlight-type="colorize-uppercase-bold"
      :class="{ 'font-weight-normal': mode === 'faq' }"
    >

On this element I have a css-hover class


    .InfoTile {
      &:hover {
        .answer {
          background-color: $transparent-primary;
          opacity: 1;
        }
    
        .question {
          opacity: 0;
        }
      }

When I use the „incentive" mode I need to use another hover background-color. Is there a way to use another hover depending on the mode I use?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

So, is totally possible.

You just need to create 2 differentes css classes, between normal mode and incentive, that will have 2 differentes hover, etc.

you'll made a conditional term checking if mode === incentive.

But, the first thing you need to do is to set more than one classes in your component, you're using one already.

so, just do something like this.

:class="[{ 'font-weight-normal': mode === 'faq' }, mode === incentive ? 'cssClass1': 'cssClass2']"
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!