Implement the first theme, let's start with "Minimal"
See original GitHub issueFirst of all, here’s the screeshot answering the question “why?”:
So I guess, it’s time to start implementing sweet themes for SweetAlert2 😃
From https://www.reddit.com/r/webdev/comments/7xput6/sweetalert2_a_beautiful_responsive_highly/dubc28n/
This is cool, but to my eye, most of these boxes look a little big for general purposes. I think, generally, if I’m being alerted about… whatever, , I have no need for a ton of negative space of fun animations or big text, I just want a small box that grabs my attention (mostly via the contrast), tells me what I need to know, and gets my conversation.
Of course, browser based alerts suck, and your shit is more customizable with a better button and without invoking the horror most people feel when they’re trying to kill an ad that just won’t die… So yeah, it looks like your alerts are the shit, I’m just giving my two cents, maybe a smaller box by default would get the job did well.
I need your opinions about files structure and themes organization. This is how I see it, feel free to suggest other solutions:
-
Themes will be nothing more than additional SASS files, I think it makes sense to keep all themes in this repository, let’s say in
src/themes
folder -
The structure of SASS files will be something like:
@import '../variables';
// overriding SASS variables
@import '../sweetalert2';
- Compiled themes (CSS) will be located in
dist/themes
folder.
I will implement the first “Minimal” theme without animations and shit to make old-school fellas happy 😃
Issue Analytics
- State:
- Created 6 years ago
- Reactions:8
- Comments:8 (6 by maintainers)
Yeah! Excellent idea. Also answers https://github.com/sweetalert2/sweetalert2/issues/547 (7 👍)
It would be good if the themes are also provided on the dist/ version as standalone CSS files, not just SCSS files.
Also consider that any theme is inherently very opinionated. It would be nice to keep as much of that out of the core as possible. Opinions/tastes in separate modules on the other hand are totally fine since they can be swapped out for another more customized one (a fork or a fresh repository), and used just as easily (i.e. none are “special”). Ok I think those are my best arguments.