question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug Report] v-alert text prominent incorrect css for icon opacity

See original GitHub issue

Environment

Vuetify Version: 2.3.10 Vue Version: 2.6.12 Browsers: Chrome 85.0.4183.83 OS: Mac OS 10.14.6

Steps to reproduce

Using latest vue-cli (4.5.4) and latest vuetify (2.2.11), and creating a new project with defaults or any custom configuration.

<v-alert type="info" text prominent>Bla,bla,bla</v-alert>

Opacity around icon doesn’t appears.

Rule .v-icon.v-icon::after overwrittes .v-alert–prominent .v-alert__icon:after so:

.v-icon.v-icon:after {
    background-color: currentColor;
    border-radius: 50%;
    content: "";
    display: inline-block;
    height: 100%;
    left: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    transform: scale(1.3);
    width: 100%;
    transition: opacity .2s cubic-bezier(.4,0,.6,1);
}

.v-alert--prominent .v-alert__icon:after {
    background: currentColor!important;
    border-radius: 50%;
    bottom: 0;
    content: "";
    left: 0;
    opacity: .16; <-- overwritten
    position: absolute;
    right: 0;
    top: 0;
}

Expected Behavior

With opacity

Actual Behavior

Without opacity

Reproduction Link

https://codepen.io/ndesorden/pen/QWNOoew

Well, codepen is ok because with webpack install or cdn everything is ok. Problem is with vue-cli install

Expected: Captura de pantalla 2020-09-05 a las 1 24 23

Current: Captura de pantalla 2020-09-05 a las 1 21 53

Captura de pantalla 2020-09-05 a las 0 54 50

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jblachlycommented, Apr 20, 2021

Instead of opening a new issue, I want to comment that I have the opposite problem:

Expected: No halo

Results: Halo

In the documentation for v-alert[0], there is no halo around the icon. However, when opening this same example in a codepen, the halo is there – just as it is in my vue-cli installed project.

[0] https://vuetifyjs.com/en/components/alerts/#prominent

0reactions
johnleidercommented, Apr 20, 2021

This is a CSS specificity issue spawned from ordering when built for production.

Read more comments on GitHub >

github_iconTop Results From Across the Web

opacity - CSS: Cascading Style Sheets - MDN Web Docs
The opacity CSS property sets the opacity of an element. ... If text opacity is adjusted, it is important to ensure that the...
Read more >
Material Symbols and Icons - Google Fonts
Introducing Material Symbols. Material Symbols are our newest icons consolidating over 2,500 glyphs in a single font file with a wide range of...
Read more >
Alert component - Vuetify
The v-alert component is used to convey important information to the user through the use of contextual types, icons, and colors. These default...
Read more >
ANDI - Alerts
When ANDI is launched, it automatically analyzes every HTML element currently on the page looking for conditions that cause accessibility issues.
Read more >
HTML and CSS Tutorial - Nanyang Technological University
An HTML document is a text document, and it is human-readable. Today, HTML works together with CSS (Cascading Style Sheets) (for layout) and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found