Comments (7)
Hi @Delpire, why do you feel overriding the CSS is a bad idea?
from toast.
@chrissainty Hello! Perhaps just my lack of css experience. I can give it a try. I like how bootstrap often provides different classes I can pass to an html element to specify the size, I just thought it would be nice to provide this to the Blazored Toast element.
from toast.
I understand where you’re coming from. The problem is what sizes do we provide? Small, medium, large? What’s small? What’s large? One persons small is another persons medium or vice versa.
I’m open to ideas.
from toast.
Well right off the bat, having an option to remove the header would reduce the height. That being said, it probably isn't a good idea to depend purely on color.
I could see maybe providing a "compact" option where the padding is reduced, the font size is reduced, and perhaps the header and text could be on the same line. Kind of like how Slack provides Clean vs Compact messages:
I think you are right though. It is a difficult thing to decide as far as fixed values.
An alternative would be to provide some levers that a user could customize. I just overrode the css by reducing the font-size and the width of the blazored-toast class. If these were parameters to the BlazoredToast component then a user could customize it. I'm not sure how well the support for this is in Blazor. It might have to be applied directly to the html, which with my limited understanding might be a bad decision.
Overall, I'm pretty new to Web UI design, so I am not very familiar with best practices, and Blazor is so new a lot of best practices probably haven't been determined yet. 😅
from toast.
We could definitely expose some levers for people to tweak but if I’m honest, CSS does all of this. I’m reluctant to adds loads of options into the component and make the code far more complex when everything is infinitely customisable with CSS.
from toast.
That's fair. I am okay with this simply being closed.
One last option that I am also not sure about the feasibility of, would be to provide some kind of empty toast type that we could pass a render fragment to.
<Blazored.EmptyToast>
content...
</Blazored.EmptyToast>
Regardless, thank you for taking the time to discuss this!
from toast.
@Delpire We have added a custom toast option now that might be of interest to you
from toast.
Related Issues (20)
- [Feature Request]
- [Bug] Per instance timeout not working HOT 2
- Adding Position to ToastSettings HOT 2
- [Question] Migration to Version 4 - Break Change HOT 1
- Resize font parameter HOT 1
- Css question HOT 6
- Using CSS variables? HOT 2
- [Feature] Additional or custom icons HOT 2
- [Bug] ToastPosition BottomCenter/TopCenter not centered on mobile
- [Question] Toast click event propagation HOT 2
- [Bug] White bar at top of custom alert HOT 3
- [Question] No styles HOT 1
- Rendering Toast in cshtml or firing the toast from cshtml.cs HOT 2
- [Bug] Additional Classes for Warning / Info / Success / etc. Toasts are no longer applied HOT 3
- [Bug] ToastSettings.ShowProgressBar not working for default toasts
- No Toast Notification in Safari 16.5.1 HOT 2
- New override to InMemoryToastService to include toast details HOT 2
- [Feature] Add Fade Out Functionality HOT 1
- Is it possible to increase the z-index in BlazoredToasts.razor.css to zindex-tooltip (1080)? HOT 4
- [Bug] Position incorrect when viewing in cell phone mode or narrow window on Blazor Server HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from toast.