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

BS4 - Alerts not showing #3686

Closed
Moc opened this issue Feb 22, 2019 · 13 comments
Closed

BS4 - Alerts not showing #3686

Moc opened this issue Feb 22, 2019 · 13 comments
Labels
topic: frontend type: bug A problem that should not be happening
Milestone

Comments

@Moc
Copy link
Member

Moc commented Feb 22, 2019

In a bootstrap 4 theme, alerts (info, warning, error messages) are not visible on frontend because there is a CSS conflict with transitions.css from Bootstrap 4.

.fade:not(.show) {
    opacity: 0;
}

If I add the following to theme.php, it is fixed:

.s-message.fade {
opacity: 1 !important;
visibility: inherit;
}

I (Jimmi! 😄 ) took this code from the vstore plugin.

I am not sure if this is the right fix, so I created an issue for it. Perhaps there's a cleaner way to do it as this is more a bandaid.

@Moc Moc added the type: bug A problem that should not be happening label Feb 22, 2019
@Moc Moc added this to the Future milestone Feb 22, 2019
@Moc
Copy link
Member Author

Moc commented Feb 22, 2019

Reported by @Jimmi08 before here: #2898 (comment)

@CaMer0n
Copy link
Member

CaMer0n commented Feb 22, 2019

@Moc Would adding that to e107.css fix it?

@Moc
Copy link
Member Author

Moc commented Feb 24, 2019

@CaMer0n Yeah it did, I just wasn't sure if that was the best solution. It seems more of a band aid than actual fix, but I personally don't know another way to fix it.

@CaMer0n
Copy link
Member

CaMer0n commented Feb 24, 2019

@Moc Do you know where the conflict occurs in e107?

@Moc
Copy link
Member Author

Moc commented Feb 25, 2019

Not sure if I understand your question. See my initial issue report. It conflicts with the transitions.css file from Bootstrap 4.

@Jimmi08
Copy link
Contributor

Jimmi08 commented Jun 6, 2019

I can confirm that this is still the problem.

Next solution is for bootstrap 4 not insert class fade in for alert boxes. Problem is combination s-message + fade classes

@CaMer0n
Copy link
Member

CaMer0n commented Apr 29, 2020

@Moc Is this still an issue? The alerts display for me. How about you?

@Moc Moc self-assigned this Apr 30, 2020
@Moc Moc added the status: awaiting feedback This issue may be fixed and is awaiting the original poster to confirm the fix. label Apr 30, 2020
@Moc
Copy link
Member Author

Moc commented Apr 30, 2020

Still the same issue for me. I see it works on the boostrap4 theme, but I am getting the same CSS conflict for my own custom theme (www.nextgeneration.city)

I have this is in my theme.php as a temporary fix. If I delete it, the alerts are not shown:

// Fix for alerts not showing. Conflict with BS4 (transitions.css). 
e107::css("inline", "
    .s-message.fade {
opacity: 1 !important;
visibility: inherit;
}");

@Moc Moc removed the status: awaiting feedback This issue may be fixed and is awaiting the original poster to confirm the fix. label Apr 30, 2020
@Moc Moc removed their assignment Apr 30, 2020
@Jimmi08
Copy link
Contributor

Jimmi08 commented Apr 30, 2020

It works for BT4 because there is the same fix in style.css:

/* fix for message box */
.s-message.fade {
opacity: 1 !important;
visibility: inherit;
} 

@CaMer0n
Copy link
Member

CaMer0n commented May 1, 2020

@Moc @Jimmi08 So why don't we simply move it into e107.css ?

@Jimmi08
Copy link
Contributor

Jimmi08 commented May 1, 2020

I am not sure if this is the right fix, so I created an issue for it. Perhaps there's a cleaner way to do it as this is more a bandaid.

neither me.

@Moc
Copy link
Member Author

Moc commented May 1, 2020

See my answer and quote above. I don't know if that's the best way. Sure it will fix it but I'm no expert in CSS to determine if that's the cleanest way to do it.

@CaMer0n
Copy link
Member

CaMer0n commented May 1, 2020

@Moc Sorry, I should have read the whole thread. Commit coming.

@CaMer0n CaMer0n closed this as completed in cd01e81 May 1, 2020
CaMer0n added a commit that referenced this issue May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: frontend type: bug A problem that should not be happening
Projects
None yet
Development

No branches or pull requests

3 participants