-
Notifications
You must be signed in to change notification settings - Fork 13.4k
feat(toast): add the default styles for ionic theme #29922
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
Merged
Changes from 5 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
8699b1e
feat(toast): add the default styles for ionic theme
thetaPC 090cb56
refactor(toast): update styles
thetaPC ca9c98b
docs(toast): add TODO
thetaPC d279361
test(toast): add snapshots
thetaPC 03f06fd
Merge branch 'next' of github.com:ionic-team/ionic-framework into ROU…
thetaPC d931e27
refactor(toast): change token
thetaPC f0bc6f0
refactor(toast): add gap within button group
thetaPC 70f92e0
test(toast): update button text
thetaPC 3ec8560
refactor(toast): use correct spacing
thetaPC d4b57fb
refactor(toast): add header styles
thetaPC File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+28.4 KB
.../toast.e2e.ts-snapshots/toast-bottom-ionic-md-ltr-light-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+39.8 KB
...toast.e2e.ts-snapshots/toast-bottom-ionic-md-ltr-light-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+25 KB
.../toast.e2e.ts-snapshots/toast-bottom-ionic-md-ltr-light-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.26 KB
...toast.e2e.ts-snapshots/toast-buttons-ionic-md-ltr-light-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.76 KB
...oast.e2e.ts-snapshots/toast-buttons-ionic-md-ltr-light-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.34 KB
...toast.e2e.ts-snapshots/toast-buttons-ionic-md-ltr-light-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.29 KB
...toast.e2e.ts-snapshots/toast-buttons-ionic-md-rtl-light-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.74 KB
...oast.e2e.ts-snapshots/toast-buttons-ionic-md-rtl-light-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.33 KB
...toast.e2e.ts-snapshots/toast-buttons-ionic-md-rtl-light-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.18 KB
...c/toast.e2e.ts-snapshots/toast-color-ionic-md-ltr-light-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.82 KB
.../toast.e2e.ts-snapshots/toast-color-ionic-md-ltr-light-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.18 KB
...c/toast.e2e.ts-snapshots/toast-color-ionic-md-ltr-light-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+31.1 KB
.../toast.e2e.ts-snapshots/toast-middle-ionic-md-ltr-light-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+44.2 KB
...toast.e2e.ts-snapshots/toast-middle-ionic-md-ltr-light-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+26.2 KB
.../toast.e2e.ts-snapshots/toast-middle-ionic-md-ltr-light-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.19 KB
(96%)
.../test/basic/toast.e2e.ts-snapshots/toast-middle-ios-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.59 KB
(100%)
...test/basic/toast.e2e.ts-snapshots/toast-middle-ios-ltr-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.22 KB
(96%)
...t/test/basic/toast.e2e.ts-snapshots/toast-middle-md-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.5 KB
(100%)
.../test/basic/toast.e2e.ts-snapshots/toast-middle-md-ltr-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.81 KB
...ast.e2e.ts-snapshots/toast-start-end-ionic-md-ltr-light-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.29 KB
...st.e2e.ts-snapshots/toast-start-end-ionic-md-ltr-light-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.83 KB
...ast.e2e.ts-snapshots/toast-start-end-ionic-md-ltr-light-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.88 KB
...ast.e2e.ts-snapshots/toast-start-end-ionic-md-rtl-light-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.28 KB
...st.e2e.ts-snapshots/toast-start-end-ionic-md-rtl-light-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.84 KB
...ast.e2e.ts-snapshots/toast-start-end-ionic-md-rtl-light-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.12 KB
...ic/toast.e2e.ts-snapshots/toast-text-ionic-md-ltr-light-Mobile-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+9.47 KB
...c/toast.e2e.ts-snapshots/toast-text-ionic-md-ltr-light-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file added
BIN
+6.14 KB
...ic/toast.e2e.ts-snapshots/toast-text-ionic-md-ltr-light-Mobile-Safari-linux.png
Oops, something went wrong.
Binary file added
BIN
+30.5 KB
...sic/toast.e2e.ts-snapshots/toast-top-ionic-md-ltr-light-Mobile-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+42.9 KB
...ic/toast.e2e.ts-snapshots/toast-top-ionic-md-ltr-light-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file added
BIN
+25.5 KB
...sic/toast.e2e.ts-snapshots/toast-top-ionic-md-ltr-light-Mobile-Safari-linux.png
Oops, something went wrong.
Binary file modified
BIN
-1.13 KB
(96%)
...ast/test/basic/toast.e2e.ts-snapshots/toast-top-ios-ltr-Mobile-Chrome-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.59 KB
(100%)
...st/test/basic/toast.e2e.ts-snapshots/toast-top-ios-ltr-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file modified
BIN
-1.25 KB
(96%)
...oast/test/basic/toast.e2e.ts-snapshots/toast-top-md-ltr-Mobile-Chrome-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.49 KB
(100%)
...ast/test/basic/toast.e2e.ts-snapshots/toast-top-md-ltr-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.18 KB
(120%)
...toast.e2e.ts-snapshots/toast-translucent-color-ios-ltr-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1.08 KB
(120%)
...basic/toast.e2e.ts-snapshots/toast-translucent-ios-ltr-Mobile-Firefox-linux.png
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| @use "../../themes/ionic/ionic.globals.scss" as globals; | ||
| @use "./toast.common"; | ||
|
|
||
| // Ionic Toast | ||
| // -------------------------------------------------- | ||
|
|
||
| :host { | ||
| --background: #{globals.$ionic-color-neutral-1200}; | ||
| --border-radius: #{globals.$ionic-border-radius-400}; | ||
| --box-shadow: #{globals.$ionic-elevation-400}; | ||
| --button-color: #{globals.$ionic-color-base-white}; | ||
| --color: #{globals.$ionic-color-base-white}; | ||
| --max-width: 343px; | ||
| --start: 8px; | ||
| --end: 8px; | ||
|
|
||
| @include globals.typography(globals.$ionic-body-md-medium); | ||
|
|
||
| // TODO(ROU-10853): replace this value with a layer token. | ||
| z-index: 1001; | ||
| } | ||
|
|
||
| .toast-wrapper { | ||
| @include globals.margin(auto); | ||
|
|
||
| display: block; | ||
| position: absolute; | ||
|
|
||
| opacity: 0.01; | ||
|
|
||
| // TODO(ROU-10853): replace this value with a layer token. | ||
| z-index: 10; | ||
| } | ||
|
|
||
| .toast-content { | ||
| @include globals.padding(globals.$ionic-space-300, globals.$ionic-space-400); | ||
| } | ||
|
|
||
| // Toast Button | ||
| // -------------------------------------------------- | ||
|
|
||
| .toast-layout-baseline .toast-button-group-start { | ||
| @include globals.margin(null, null, null, globals.$ionic-space-400); | ||
| } | ||
|
|
||
| .toast-layout-stacked .toast-button-group-start { | ||
| @include globals.margin(globals.$ionic-space-400, globals.$ionic-space-400, null, null); | ||
| } | ||
|
|
||
| .toast-layout-baseline .toast-button-group-end { | ||
| @include globals.margin(null, globals.$ionic-space-400, null, null); | ||
| } | ||
|
|
||
| .toast-layout-stacked .toast-button-group-end { | ||
| @include globals.margin(null, globals.$ionic-space-400, globals.$ionic-space-400, null); | ||
| } | ||
|
|
||
| .toast-button { | ||
| @include globals.typography(globals.$ionic-body-md-link); | ||
| @include globals.padding(0); | ||
|
|
||
| // necessary for ripple to work properly | ||
| position: relative; | ||
|
|
||
| background-color: transparent; | ||
|
|
||
| overflow: hidden; | ||
| } | ||
|
|
||
| // Toast Icon | ||
| // -------------------------------------------------- | ||
|
|
||
| .toast-icon, | ||
| .toast-button-icon { | ||
| font-size: globals.$ionic-font-size-600; | ||
brandyscarney marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| @import "./toast"; | ||
| @import "./toast.native"; | ||
| @import "./toast.ios.vars"; | ||
|
|
||
| // iOS Toast | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| @import "./toast"; | ||
| @import "./toast.native"; | ||
| @import "./toast.md.vars"; | ||
|
|
||
| // Material Design Toast | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| @use "./toast.common"; | ||
| @import "./toast.vars"; | ||
|
|
||
| :host { | ||
| font-family: $font-family-base; | ||
|
|
||
| z-index: $z-index-overlay; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.