Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
5a68deb to
9be95c9
Compare
cfdf18d to
0a21287
Compare
ShaneK
left a comment
There was a problem hiding this comment.
Looks really good, the sizes and spacing all line up and the pressed outline in toolbars is fixed! Just a couple of datetime things, mainly the disabled month arrows looking tappable.
| background: 'transparent', | ||
|
|
||
| opacity: '0.5', | ||
| color: rgba('var(--ion-text-color-rgb, 0, 0, 0)', 0.25), |
There was a problem hiding this comment.
The readonly datetime's Cancel, Clear and Done buttons go from primary to rgba(0, 0, 0, 0.25) here, same as the md one on #31636. One fix in datetime should cover both.
| @@ -517,8 +527,7 @@ export const defaultTheme: DefaultTheme = { | |||
|
|
|||
| disabled: { | |||
There was a problem hiding this comment.
The month arrows in a disabled datetime look tappable now. They stay full primary while Cancel and Done go gray, because datetime.ios.scss sets color on .calendar-action-buttons ion-button directly, and the 0.5 opacity that used to mark them disabled is gone. Could the arrows set the button's color tokens instead of color, like md does, so the disabled color can take over?
There was a problem hiding this comment.
The arrows now set the clear color tokens instead of color, like md, so they pick up the disabled color along with Cancel and Done. This also covers an arrow disabled by min or max. Done in 52e665e.
| | Icon spacing | `0.3em` into the padding and a `0.3em` gap | at the padding edge and a `0.2222em` gap (`4px` at the default size) | `IonButton.size.<size>.icon.leading.margin` and `.trailing.margin` | | ||
| | Icon-only icon size | `1.308125em`, `1.125em` and `0.9em` | `1.1333em`, `1.2em` and `1.0588em` (same pixels at the new font size) | `IonButton.size.<size>.iconOnly.icon.font.size` | | ||
| | Spinner in a button | the spinner's own size (`28px` by default) | `1.2em` by default (`18px` at the default size), with the other spinner sizes in their usual ratio to it | `IonButton.size.<size>.spinner.size.<spinner size>.width` and `.height` | | ||
| | Disabled | the whole button at `0.5` opacity | the text color at `25%`, which outline also uses for its border, and on solid, an `8%` container | `IonButton.hue.bold.<fill>.disabled.opacity`, `.color`, `.background` and `.border.color` | |
There was a problem hiding this comment.
Like the md rows on #31636, this row doesn't mention the .semantic paths, and the semantic disabled values changed too.
There was a problem hiding this comment.
Added the .semantic paths to the row in 72933d1.
…FW-6838-ios-sync # Conflicts: # core/src/themes/ios/default.tokens.ts
Issue number: resolves internal
What is the current behavior?
ios buttons use values carried over from v9 instead of iOS 17: 13px and 20px labels at the small and large sizes, medium weight, larger icons pushed into the padding, a 0.5 fade when disabled, and spinners at their own 28px size, which makes buttons taller.
What is the new behavior?
ios buttons follow iOS 17, from the Apple Design Resources kit and measurements of a native
UIButton:1.2emwith a 4px gap to the label, at the padding edgePressed outline buttons in ios toolbars fill with the toolbar color again. The migration ported a
nextrule that had no effect, becausebutton.ios.scsspainted the pressed background directly, which left the label white on a transparent background.Toolbar buttons keep their previous colors when disabled.
Snapshots are in #31666.
Does this introduce a breaking change?
The
iosbutton follows iOS 17 for its font, icons, spinners and disabled state. To keep a previous value, set the token for global styles, or the matching--ion-button-*CSS variable for component-specific styles. Replace<fill>withsolid,outlineorclear, and<size>withsmall,mediumorlarge. Values inemare relative to the font size, so reverting the font size also needs the previousemvalues.13px,16pxand20px15px,15pxand17pxIonButton.size.<size>.font.size500400IonButton.hue.bold.<fill>.default.font.weight0.77em,0.875emand1em0.6667em,0.9333emand1.1765em(same pixels at the new font size)IonButton.size.<size>.padding.startand.end2.16em,2.125emand2.5em1.8667em,2.2667emand2.9412em(same pixels at the new font size)IonButton.size.<size>.min.height1.35em1.2emIonButton.size.<size>.icon.font.size0.3eminto the padding and a0.3emgap0.2222emgap (4pxat the default size)IonButton.size.<size>.icon.leading.marginand.trailing.margin1.308125em,1.125emand0.9em1.1333em,1.2emand1.0588em(same pixels at the new font size)IonButton.size.<size>.iconOnly.icon.font.size28pxby default)1.2emby default (18pxat the default size), with the other spinner sizes in their usual ratio to itIonButton.size.<size>.spinner.size.<spinner size>.widthand.height0.5opacity25%, which outline also uses for its border, and on solid, an8%containerIonButton.hue.bold.<fill>.disabled.opacity,.color,.backgroundand.border.color(.semantic.disabled.color,.backgroundand.border.colorwith acolor)Other information
Not matched to iOS 17 on purpose
soft(6px), which feat(button): set default shape to soft for ios and round for md and ionic themes #29404 set from SwiftUI0. WebKit already applies SF Pro tracking to the system fontLeft for the parents
ion-buttonsmigrationHow to test