-
Notifications
You must be signed in to change notification settings - Fork 13.4k
fix(many): add rich content styles for select options #31138
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
Open
thetaPC
wants to merge
33
commits into
next
Choose a base branch
from
FW-7290
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
df394f2
fix(select-option): add rich content styles
thetaPC ce322f5
fix(action-sheet): add ionic theme
thetaPC db262b5
fix(action-sheet): add ionic theme
thetaPC c4aff48
test(action-sheet): add states page
thetaPC 01cbf63
test(action-sheet): update states page
thetaPC d4680c5
fix(alert): add ionic theme
thetaPC bf4bc97
fix(action-sheet): split imports
thetaPC b3bd9ec
fix(alert): strip out imports
thetaPC 2d7c760
fix(select-modal): update ionic theme
thetaPC 03eb8d2
fix(action-sheet, alert): update ionic theme
thetaPC efc38be
fix(select-modal): update ionic theme
thetaPC 6d01165
fix(action-sheet, alert, item): update ionic theme
thetaPC 2305fc4
fix(alert): update ionic theme
thetaPC dce202e
test(action-sheet): update snapshots
thetaPC 865d9af
fix(select-modal): update ionic theme
thetaPC 5fa29e5
fix(select-popover): update ionic theme
thetaPC 73f270d
fix(select-modal): update styles
thetaPC c7e177d
test(select): update order
thetaPC 360a911
test(app): update snapshots
thetaPC 5fda2dd
fix(many): improving cloning and add slot styles
thetaPC 634408c
feat(alert): use ion-radio and ion-checkbox
thetaPC e26824c
Revert "feat(alert): use ion-radio and ion-checkbox"
thetaPC 9c534e6
feat(select-option): add labelPlacement and justify props
thetaPC 9b0e9f0
fix(alert): correct spot for radio
thetaPC b93a4cc
test(select-modal): update snapshots
thetaPC c9e6444
test(select-popover): update snapshots
thetaPC f968c7b
test(select): update snapshots
thetaPC 7a4b385
test(alert): add label placement tests
thetaPC 666a9a4
test(select-option): add label placement and justify tests
thetaPC cfc9b48
Merge branch 'next' of github.com:ionic-team/ionic-framework into FW-…
thetaPC c1c46cb
test(select): update snapshots
thetaPC 3ea2a08
test(many): update snapshots
thetaPC a483e09
fix(select): preserve ion-icon props when slotted from frameworks
thetaPC File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
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
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
122 changes: 118 additions & 4 deletions
122
core/src/components/action-sheet/action-sheet.ionic.scss
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,22 +1,136 @@ | ||
| @use "../../themes/ionic/ionic.globals.scss" as globals; | ||
| @use "../../themes/mixins" as mixins; | ||
| @use "./action-sheet.common"; | ||
| @use "./action-sheet.md" as action-sheet-md; | ||
|
|
||
| // Ionic Action Sheet | ||
| // -------------------------------------------------- | ||
|
|
||
| :host { | ||
| --background: #{globals.$ion-bg-surface-default}; | ||
| --backdrop-opacity: 0.7; | ||
| --button-background: transparent; | ||
| --button-background-selected: #{globals.$ion-semantics-primary-100}; | ||
| --button-background-selected-opacity: 1; | ||
| --button-background-activated: #{globals.$ion-semantics-primary-100}; | ||
| --button-background-activated-opacity: 1; | ||
| --button-background-hover: #{globals.$ion-semantics-primary-100}; | ||
| --button-background-hover-opacity: 1; | ||
| --button-color: #{globals.$ion-text-default}; | ||
| --button-color-disabled: #{globals.$ion-text-disabled}; | ||
| --color: #{globals.$ion-text-default}; | ||
|
|
||
| z-index: 1001; | ||
| } | ||
|
|
||
| .action-sheet-wrapper { | ||
| z-index: 10; | ||
| } | ||
|
|
||
| .action-sheet-button.ion-focused::after { | ||
| @include globals.focused-state( | ||
| globals.$ion-border-size-050, | ||
| globals.$ion-border-style-solid, | ||
| globals.$ion-border-focus-default | ||
| ); | ||
|
|
||
| outline-offset: calc(globals.$ion-border-size-050 * -1); | ||
| } | ||
|
|
||
| // Action Sheet Wrapper | ||
| // ----------------------------------------- | ||
|
|
||
| .action-sheet-wrapper { | ||
| @include mixins.margin(var(--ion-safe-area-top, 0), auto, 0, auto); | ||
| } | ||
|
|
||
| .action-sheet-title { | ||
| @include mixins.padding(globals.$ion-space-400); | ||
| @include globals.typography(globals.$ion-heading-h6-medium); | ||
|
|
||
| color: var(--color); | ||
|
|
||
| text-align: start; | ||
| } | ||
|
|
||
| .action-sheet-sub-title { | ||
| @include globals.typography(globals.$ion-body-md-regular); | ||
|
|
||
| color: globals.$ion-text-subtlest; | ||
| } | ||
|
|
||
| // Action Sheet Group | ||
| // ----------------------------------------- | ||
|
|
||
| .action-sheet-group:first-child { | ||
| @include mixins.padding(globals.$ion-space-400, null, null, null); | ||
| } | ||
|
|
||
| .action-sheet-group:last-child { | ||
| @include mixins.padding(null, null, globals.$ion-space-400, null); | ||
| } | ||
|
|
||
| // Action Sheet Buttons | ||
| // ----------------------------------------- | ||
|
|
||
| .action-sheet-button { | ||
| @include mixins.padding( | ||
| globals.$ion-space-300, | ||
| globals.$ion-space-400, | ||
| globals.$ion-space-300, | ||
| globals.$ion-space-400 | ||
| ); | ||
| @include globals.typography(globals.$ion-body-md-regular); | ||
|
|
||
| position: relative; | ||
|
|
||
| min-height: 52px; | ||
|
|
||
| text-align: start; | ||
|
|
||
| contain: content; | ||
| overflow: hidden; | ||
| } | ||
|
|
||
| .action-sheet-icon { | ||
| @include mixins.margin(globals.$ion-space-0, globals.$ion-space-600, globals.$ion-space-0, globals.$ion-space-0); | ||
| @include globals.typography(globals.$ion-body-md-regular); | ||
|
|
||
| color: var(--color, globals.$ion-text-default); | ||
| } | ||
|
|
||
| .action-sheet-button-inner { | ||
| justify-content: flex-start; | ||
| } | ||
|
|
||
| .action-sheet-selected { | ||
| font-weight: bold; | ||
| } | ||
|
|
||
| // Action Sheet: Select Option | ||
| // -------------------------------------------------- | ||
|
|
||
| .action-sheet-button-label { | ||
| gap: globals.$ion-space-300; | ||
| } | ||
|
|
||
| .select-option-start, | ||
| .select-option-end { | ||
| gap: globals.$ion-space-200; | ||
| } | ||
|
|
||
| /** | ||
| * Cap slotted children so they can't stretch the option | ||
| * row out of proportion, keeping rows visually uniform | ||
| * regardless of the content. | ||
| */ | ||
| .select-option-start > *, | ||
| .select-option-end > * { | ||
| max-height: globals.$ion-scale-1200; | ||
| } | ||
|
|
||
| .select-option-description { | ||
| @include globals.typography(globals.$ion-body-md-regular); | ||
| @include globals.padding(0); | ||
| @include globals.padding(globals.$ion-space-0); | ||
|
|
||
| color: globals.$ion-text-subtle; | ||
|
|
||
| font-size: globals.$ion-font-size-350; | ||
| } |
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 |
|---|---|---|
|
|
@@ -161,3 +161,6 @@ $action-sheet-ios-group-translucent-filter: saturate(280%) blur(20px); | |
|
|
||
| /// @prop - Filter of the translucent action-sheet button | ||
| $action-sheet-ios-button-translucent-filter: saturate(120%); | ||
|
|
||
| /// @prop - Maximum size of slotted children rendered in a select option's start/end slot | ||
| $action-sheet-ios-select-option-slot-size: dynamic-font-max(24px, 2); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Based on what I found through iOS code and that it scales up. |
||
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,7 +1,7 @@ | ||
| @import "./action-sheet.native"; | ||
| @import "./action-sheet.md.vars"; | ||
|
|
||
| // Material Design Action Sheet Title | ||
| // Material Design Action Sheet | ||
| // ----------------------------------------- | ||
|
|
||
| :host { | ||
|
|
@@ -110,3 +110,16 @@ | |
| .action-sheet-selected { | ||
| font-weight: bold; | ||
| } | ||
|
|
||
| // Action Sheet: Select Option | ||
| // -------------------------------------------------- | ||
|
|
||
| /** | ||
| * Cap slotted children so they can't stretch the option | ||
| * row out of proportion, keeping rows visually uniform | ||
| * regardless of the content. | ||
| */ | ||
| .select-option-start > *, | ||
| .select-option-end > * { | ||
| max-height: 24px; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Based on MD3 |
||
| } | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By restructuring it this way, we are making sure that this style will be just a copy and paste for the Modular Ionic migration.