My code is this, I tried different codes but not works.
.tabbrowser-tab::after::last-child{
content: "" !important;
display: block;
height: var(--tab-height-personal) !important;
width: 130px !important;
border-bottom: 1px solid blue !important;
border-image: var(--panel-separator-zap-gradient2) 1 !important;
}
That selector is invalid.
:last-child
is a pseudo-class there should only be one colon.::after
denotes a pseudo-element but pseudo-elements cannot have any pseudo-classes - or any other attributes for that matter on their own. The way you have wrote the selector sort of implies “an ::after pseudo-element which also has:last-child
pseudo-class”.To make it valid you would write it like this
.tabbrowser-tab:last-child::after
. However, a.tabbrowser-tab
will never be a last-child of its parent, because there will always be anafter it. Luckily for you the node type of tabs is
so then you can use:last-of-type
instead of:last-child
. Technically it’s not the same thing, but probably what you want.Thanks for the explanation, you are a genius. I will use this:
.tabbrowser-tab:last-of-type::after