Is there a way to incorporate a bottom border into Vuetify's v-tabs component?

I am trying to achieve a specific result: https://i.sstatic.net/1Um2th3L.png

This is how I accomplished it:

<v-tabs>
  <v-tab
    v-for="(tab, i) in tabs"
    :key="i"
    v-bind="tab"
  ></v-tab>
</v-tabs>
<v-divider></v-divider>

However, I want to achieve the same appearance using only CSS without using <v-divider>. I attempted this:

<template>
  <v-tabs class="bordered-tab">
    <v-tab
      v-for="(tab, i) in tabs"
      :key="i"
      v-bind="tab"
    ></v-tab>
  </v-tabs>
</template>

<style scoped>
.bordered-tab {
  border-bottom: 1px solid red;
}
</style>

Here is the result: https://i.sstatic.net/cWn0o5Ng.png

The blue border should appear on top of the red one. How can I achieve this?

Edit #1

Thanks to the insights from @kissu, I was able to reach my desired outcome. Here is the complete code:

<template>
  <v-tabs class="bordered-tabs">
    <v-tab
      v-for="(tab, i) in tabs"
      :key="i"
      v-bind="tab"
    ></v-tab>
  </v-tabs>
</template>

<style scoped>
.bordered-tabs >>> .v-slide-group__content {
  border-bottom: 1px solid #0000001e;
}
</style>

Another thing I would like to do is to apply the style to all .v-slide-group__content elements without explicitly adding a class to them, like so:

.v-slide-group__content {
  border-bottom: 1px solid #0000001e;
}

How can I achieve this?

Edit #2

Since I only wanted to apply the above class to horizontal <v-tabs>, I included the following rule in my main.css file:

.v-tabs:not(.v-tabs--vertical) .v-slide-group__content {
  border-bottom: 1px solid #0000001e;
}

With this rule, the border-bottom will be applied as follows:

<!-- border-bottom will be applied -->
<v-tabs>
  <!-- tabs... -->
</v-tab>

<!-- border-bottom will not be applied -->
<v-tabs direction="vertical">
  <!-- tabs... -->
</v-tabs>

Answer №1

Feel free to utilize the code snippet below:

<style scoped>
  .edit-those-classes >>> .v-slide-group__content {
    border-bottom: 10px orange solid;
  }
</style>

For a complete example, click here.

For more information on deep selectors, visit this link.


To apply this style globally, simply remove the scoped attribute:

<style>
  .v-slide-group__content {
    border-bottom: 10px orange solid;
  }
</style>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The VueJS application's Vuex Getter appears to display as an empty array, yet when utilizing console.log, it reveals itself as an object containing all the corresponding values

Here's the method I'm using, it's pretty straightforward. DailyCountTest: function (){ this.$store.dispatch("DailyCountAction") let NewPatientTest = this.$store.getters.NewPatientCountGET console.log(NewPatientTest) } The getter ret ...

What is the best way to shift the lower section to align with the right side of the rest of the headers and text blocks?

Help needed with moving the Uni section to align it beside other paragraphs and headers. Tried using float left but no luck so far. Any suggestions would be appreciated! Check out the code here <div class ="container"> <div id="education" class ...

Avoid automatic reloading immediately after saving by utilizing vue-query in conjunction with the invalidateQueries() function

I have a Vue component where saving triggers the server to return the updated record. This means there is no need for an additional request to the server. However, I have noticed that the cache needs to be invalidated, causing a new GET request: queryClien ...

Having trouble navigating menus and submenus?

Customizing CSS Styles On my website, I have two different classes: menu and leftside. Both classes include the ul and li elements. However, when I try to use ul and li in the left side as well, they end up matching with the styles of the menu ul and li. ...

Utilizing LESS for Mixing

I've been diving into the official LESS documentation (version 1.5) and I'm struggling to grasp how I can import a reference to another CSS file to utilize its content in my own stylesheet. For instance: stylesheet.less @import (reference) "boo ...

The positioning of drawings on canvas is not centered

I'm facing an issue while attempting to center a bar within a canvas. Despite expecting it to be perfectly centered horizontally, it seems to be slightly off to the left. What could possibly be causing this discrepancy? CSS: #my-canvas { border: ...

Vue.js - encountering an issue with undefined response data

Greetings! I've encountered a script issue while trying to submit a form in VUE. The error message displayed in the developer panel states: "TypeError: error.response.data.errors is undefined". As a newcomer to Vue, I'm seeking some assistance as ...

``There seems to be an issue with background size not functioning properly in

I have successfully implemented a body background image with full width following your previous questions and answers. However, I encountered an issue on Mozilla browser where the image is not scaling to full width. Here is the CSS code I am using: backgr ...

SVG with embedded fonts failing to display properly in web browsers

Within this SVG, there are two different font types being used: SymbolMT for the mathematical expressions and Hind-Light for the text. Both fonts have been defined within the @font-face section of the SVG. The font used for the math expressions appears a ...

Delete items within the first 10 minutes of shutting it down

Is there a way to temporarily remove a newsletter element for 10 minutes after closing it on a webpage? The idea is that once the panel is closed, it should stay hidden even if the page is refreshed within that timeframe. I was considering using local stor ...

Comparing onScopeDispose with scope.cleanups

While reviewing some source code to ensure proper cleanup of my event bus on component destruction, I came across the use of scope.cleanups (found in https://github.com/vueuse/vueuse/blob/main/packages/core/useEventBus/index.ts): const scope = getCurrentSc ...

What could be causing the CSS not to load on my WordPress website?

In an effort to improve my page speed score, I decided to install several plugins. Unfortunately, after installing w3 total cache, my website stopped loading CSS properly. Check out this image of the website ...

What is the reason behind the cautionary note associated with Vue's provide and inject functionality?

Considering incorporating Vue's new provide/inject feature into a project, I came across a warning in the official Vue documentation: The documentation states that provide and inject are primarily intended for advanced plugin/component library usage ...

What is the best way to hide the div when scrolling to the top?

Is there a way to hide the circle once it's scrolled to the top? Currently, I can scroll the circle to the top but it remains visible. Upon further exploration, I found that clicking on the circle scrolls it to the top and then on a second click, it f ...

What would be the best choice between using emit or scope-slot in this particular scenario?

The main content shown in the screenshot consists of a search feature and a sidebar component. By clicking on the search drop-down, a list of items appears. Selecting an item from this list will update the content displayed in the sidebar. If the user cli ...

Strategies for addressing frontend challenges in Bootstrap 4

Currently, I am enrolled in a program to enhance my knowledge of Angular and have encountered a challenge. My project is utilizing the most recent version of bootstrap, which is bootstrap 4. However, I am facing issues with the main page not functioning co ...

What is the best method for implementing a media query in an email generated from a backend system

I have integrated media queries into my backend (Node) email system to display different content based on whether the email is opened on a phone or desktop. Strangely, the media query works properly when the email is opened in a native app (like Yahoo&apos ...

Cryptic mention of visuals post Webpack React compilation

I've been working on my application with webpack and so far things have been improving. It seems like none of my modules are corrupt. I must admit, I was quite surprised when this tool managed to shrink my 150mb React app down to 2mb, even though I do ...

Access SCSS variable values in Angular HTML or TypeScript files

So, I've been looking into whether it's feasible to utilize the SCSS variable value within HTML or TS in Angular. For instance: Let's say I have a variable called $mdBreakpoint: 992px; stored inside the _variable.scss file. In my HTML cod ...

Resolving the issue of the 'Failed to load resource: net::ERR_FILE_NOT_FOUND' error

I'm encountering issues with loading my CSS in different browsers when using the "Copy Path" feature in VSCode. While everything displays correctly in preview mode within VS, none of the styles appear when pasting the path into Chrome or Edge. Below ...