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
Material UI implementation #21
Conversation
To override buttons background color
The variable have been introduced in sweetalert version 8.11.1
I've been wrestling with the close button for the past couple of days. Unfortunately when the I don't really like the effect, so I may drop completely the hover style (need to check if this is mandatory on material) or replace the |
The same issue is happening for the default style, but it's not obvious because there's no background color on the close button. Decreasing the |
On chrome on macOS Here you can find a codepen with the following elements: <div class="swal-close-manual">×</div>
<button class="swal-close-manual">×</button> For both the Could you have a try on linux? Or did I misunderstand your suggestion? |
Using CSS background property, the circle on hover is slightly misaligned. To workaround that, an SVG circle is used as background image. The circle is then moved slightly down to be centered around the X.
Good day @gverni!
|
Thanks @limonte for checking. I'll try some different approach and let you know. |
@limonte just to check: in general, are you ok with using SVG inside CSS? I'm asking because this is what I used to style the |
Yup, I'm fine with SVG inside CSS. What I don't like is so-called magic numbers, which are hard to understand and maintain: |
Fair enough @limonte 😉 I'll definitely avoid that. I'm setting up a linux machine so I'll avoid bothering you for testing (unfortunately Sauce Labs doesn't support latest version for Chrome/Firefox on Linux) |
There are a lot of "magic number" so we need to review this
@limonte I added styling for In general for forms elements, I found difficult to style them without using background images (as in c655575) or pseudo element (as in 9e342dd) |
@gverni I totally understand difficulties you're facing, Material theme is the most complex theme to implement. I'm alright with the PR so far, all those small details you mentioned could be improved later if needed. |
Previous code was adding the radio control also for checkboxes
@Yairsaenz7 note that I just pushed a fix for a bug I introduced for the radio button and that was affecting the checkboxes as well. Please pull the latest commit on this PR. |
Added using engine pseudo-elements
Need to be same color as `focus`
Couple of considerations on the last commits (be76d8e & c691cc0):
|
The serif font-family is not vertically aligned on macOS. Arial font-family is better vertically aligned
After 4 and half months, this PR is (finally) ready for review... |
Need to be same color as `focus`
The serif font-family is not vertically aligned on macOS. Arial font-family is better vertically aligned
OK.. now it's ready (had to merge some critical changes from master) |
@maicol07 development is completed, but we need some more testing and feed-back. Feel free to try it out and give us your feed-back! |
How can I test? |
# [2.2.0](v2.1.0...v2.2.0) (2019-10-17) ### Features * Material UI theme ([#21](#21)) ([77e5513](77e5513))
🎉 This PR is included in version 2.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
* Add material-ui folder and files * Add confirm button style * Add cancel button style * Replace "none" with 0 opacity color To override buttons background color * Use new flex justify variable The variable have been introduced in sweetalert version 8.11.1 * Set color for disabled buttons * Upgrade sweetalert2 dependency version * Add hover for close button * Add style for select * Implement hover background for close Using CSS background property, the circle on hover is slightly misaligned. To workaround that, an SVG circle is used as background image. The circle is then moved slightly down to be centered around the X. * Add error icon for text box * Add radio input styling There are a lot of "magic number" so we need to review this * Adjust poisition of swal2-label stylying for radio Previous code was adding the radio control also for checkboxes * Add style for range / slider Added using engine pseudo-elements * Apply material UI style to checkbox Apply material UI style to checkbox * Fix merge issue * Fix label padding merge issue Commit 7f14f5c (PR) was created without taking into consideration commit 76aacc2 * Implement focus for action buttons * Darken active action button background Need to be same color as `focus` * Set font-family for the close button The serif font-family is not vertically aligned on macOS. Arial font-family is better vertically aligned * Merge conflicts with master * Fix label padding merge issue Commit 7f14f5c (PR) was created without taking into consideration commit 76aacc2 * Implement focus for action buttons * Darken active action button background Need to be same color as `focus` * Set font-family for the close button The serif font-family is not vertically aligned on macOS. Arial font-family is better vertically aligned * fix lint errors * remove .sass-lint.yml
# [2.2.0](v2.1.0...v2.2.0) (2019-10-17) ### Features * Material UI theme ([#21](#21)) ([9a7b7cc](9a7b7cc))
* Add material-ui folder and files * Add confirm button style * Add cancel button style * Replace "none" with 0 opacity color To override buttons background color * Use new flex justify variable The variable have been introduced in sweetalert version 8.11.1 * Set color for disabled buttons * Upgrade sweetalert2 dependency version * Add hover for close button * Add style for select * Implement hover background for close Using CSS background property, the circle on hover is slightly misaligned. To workaround that, an SVG circle is used as background image. The circle is then moved slightly down to be centered around the X. * Add error icon for text box * Add radio input styling There are a lot of "magic number" so we need to review this * Adjust poisition of swal2-label stylying for radio Previous code was adding the radio control also for checkboxes * Add style for range / slider Added using engine pseudo-elements * Apply material UI style to checkbox Apply material UI style to checkbox * Fix merge issue * Fix label padding merge issue Commit 7f14f5c (PR) was created without taking into consideration commit 76aacc2 * Implement focus for action buttons * Darken active action button background Need to be same color as `focus` * Set font-family for the close button The serif font-family is not vertically aligned on macOS. Arial font-family is better vertically aligned * Merge conflicts with master * Fix label padding merge issue Commit 7f14f5c (PR) was created without taking into consideration commit 76aacc2 * Implement focus for action buttons * Darken active action button background Need to be same color as `focus` * Set font-family for the close button The serif font-family is not vertically aligned on macOS. Arial font-family is better vertically aligned * fix lint errors * remove .sass-lint.yml
# [2.2.0](v2.1.0...v2.2.0) (2019-10-17) ### Features * Material UI theme ([#21](#21)) ([a782cac](a782cac))
Material UI theme implementation. Feel free to contribute.
TODO / check
Icons for different pop-up types: No changesFile: No changesValidation message: No changesQueues: No changesClose #14