Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
20a4a33
feat(item-divider): add recipe and tokens
thetaPC Mar 11, 2026
8295819
chore(): run build
thetaPC Mar 12, 2026
38145a3
chore(item-divider): remove theme sass files
thetaPC Mar 12, 2026
e2cf0e4
feat(item-divider): remove theme usage
thetaPC Mar 12, 2026
4b170f0
docs(item-divider): add todo for border
thetaPC Mar 12, 2026
c66561e
refactor(tokens): rearrange shared tokens
thetaPC Mar 12, 2026
fda52f5
docs(tokens): update shared file comments
thetaPC Mar 12, 2026
eac584c
test(item): update divider snapshots
thetaPC Mar 12, 2026
87e6443
test(item): update divider snapshots again
thetaPC Mar 12, 2026
d9db79f
docs(item-divider, thumbnail): update todo
thetaPC Mar 12, 2026
6260629
docs(item-divider): update comments
thetaPC Mar 12, 2026
fd9f0b5
feat(item-divider): revert-layer note font size
thetaPC Mar 12, 2026
77e50df
feat(item-divider): add interface
thetaPC Mar 12, 2026
3336859
feat(item-divider): cleanup
thetaPC Mar 13, 2026
89bcfb4
revert(chip): import usage
thetaPC Mar 13, 2026
fc0b992
feat(item-divider): more cleanup
thetaPC Mar 13, 2026
226beaa
refactor(theme): move baseline pixel
thetaPC Mar 13, 2026
88bfce3
refactor(theme): update dynamicFont to use root
thetaPC Mar 13, 2026
a9f991b
fix(theme): check window
thetaPC Mar 13, 2026
be24a41
feat(item-divider): use note align self token
thetaPC Mar 20, 2026
8595353
feat(theme): use baseColor token
thetaPC Mar 20, 2026
bd9f016
refactor(themes): pass the root to dynamicFont
thetaPC Mar 20, 2026
ac44338
fix(item-divider): add line-height back
thetaPC Mar 20, 2026
02515ef
docs(item-divider): remove comment
thetaPC Mar 20, 2026
fd73b43
feat(themes): improve on slot keys
thetaPC Mar 20, 2026
1c72a1e
chore(): run lint
thetaPC Mar 20, 2026
b9c7961
feat(chip, item-divider): clarify leading, trailing
thetaPC Mar 20, 2026
e7233e1
docs(themes): remove extra comments
thetaPC Mar 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 10 additions & 31 deletions core/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1244,37 +1244,16 @@ ion-item-divider,shadow
ion-item-divider,prop,color,"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string & Record<never, never> | undefined,undefined,false,true
ion-item-divider,prop,mode,"ios" | "md",undefined,false,false
ion-item-divider,prop,sticky,boolean,false,false,false
ion-item-divider,prop,theme,"ios" | "md" | "ionic",undefined,false,false
ion-item-divider,css-prop,--background,ionic
ion-item-divider,css-prop,--background,ios
ion-item-divider,css-prop,--background,md
ion-item-divider,css-prop,--color,ionic
ion-item-divider,css-prop,--color,ios
ion-item-divider,css-prop,--color,md
ion-item-divider,css-prop,--inner-padding-bottom,ionic
ion-item-divider,css-prop,--inner-padding-bottom,ios
ion-item-divider,css-prop,--inner-padding-bottom,md
ion-item-divider,css-prop,--inner-padding-end,ionic
ion-item-divider,css-prop,--inner-padding-end,ios
ion-item-divider,css-prop,--inner-padding-end,md
ion-item-divider,css-prop,--inner-padding-start,ionic
ion-item-divider,css-prop,--inner-padding-start,ios
ion-item-divider,css-prop,--inner-padding-start,md
ion-item-divider,css-prop,--inner-padding-top,ionic
ion-item-divider,css-prop,--inner-padding-top,ios
ion-item-divider,css-prop,--inner-padding-top,md
ion-item-divider,css-prop,--padding-bottom,ionic
ion-item-divider,css-prop,--padding-bottom,ios
ion-item-divider,css-prop,--padding-bottom,md
ion-item-divider,css-prop,--padding-end,ionic
ion-item-divider,css-prop,--padding-end,ios
ion-item-divider,css-prop,--padding-end,md
ion-item-divider,css-prop,--padding-start,ionic
ion-item-divider,css-prop,--padding-start,ios
ion-item-divider,css-prop,--padding-start,md
ion-item-divider,css-prop,--padding-top,ionic
ion-item-divider,css-prop,--padding-top,ios
ion-item-divider,css-prop,--padding-top,md
ion-item-divider,css-prop,--background
ion-item-divider,css-prop,--color
ion-item-divider,css-prop,--inner-padding-bottom
ion-item-divider,css-prop,--inner-padding-end
ion-item-divider,css-prop,--inner-padding-start
ion-item-divider,css-prop,--inner-padding-top
ion-item-divider,css-prop,--padding-bottom
ion-item-divider,css-prop,--padding-end
ion-item-divider,css-prop,--padding-start
ion-item-divider,css-prop,--padding-top

ion-item-group,none
ion-item-group,prop,mode,"ios" | "md",undefined,false,false
Expand Down
8 changes: 0 additions & 8 deletions core/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1920,10 +1920,6 @@ export namespace Components {
* @default false
*/
"sticky": boolean;
/**
* The theme determines the visual appearance of the component.
*/
"theme"?: "ios" | "md" | "ionic";
}
interface IonItemGroup {
/**
Expand Down Expand Up @@ -7918,10 +7914,6 @@ declare namespace LocalJSX {
* @default false
*/
"sticky"?: boolean;
/**
* The theme determines the visual appearance of the component.
*/
"theme"?: "ios" | "md" | "ionic";
}
interface IonItemGroup {
/**
Expand Down
8 changes: 4 additions & 4 deletions core/src/components/chip/chip.interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@ type IonChipShapeDefinition = {
};

type IonChipMediaDefinition = {
// Styles for the media component only if it is the first element in the slot
leading?: {
// Targets `:first-child`
first?: {
margin?: IonMargin;
};

// Styles for the media component only if it is the last element in the slot
trailing?: {
// Targets `:last-child`
last?: {
margin?: IonMargin;
};
};
Expand Down
32 changes: 16 additions & 16 deletions core/src/components/chip/chip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -375,19 +375,19 @@

::slotted(ion-icon:first-child) {
@include mixins.margin(
var(--ion-chip-icon-leading-margin-top),
var(--ion-chip-icon-leading-margin-end),
var(--ion-chip-icon-leading-margin-bottom),
var(--ion-chip-icon-leading-margin-start)
var(--ion-chip-icon-first-margin-top),
var(--ion-chip-icon-first-margin-end),
var(--ion-chip-icon-first-margin-bottom),
var(--ion-chip-icon-first-margin-start)
);
}

::slotted(ion-icon:last-child) {
@include mixins.margin(
var(--ion-chip-icon-trailing-margin-top),
var(--ion-chip-icon-trailing-margin-end),
var(--ion-chip-icon-trailing-margin-bottom),
var(--ion-chip-icon-trailing-margin-start)
var(--ion-chip-icon-last-margin-top),
var(--ion-chip-icon-last-margin-end),
var(--ion-chip-icon-last-margin-bottom),
var(--ion-chip-icon-last-margin-start)
);
}

Expand All @@ -401,18 +401,18 @@

::slotted(ion-avatar:first-child) {
@include mixins.margin(
var(--ion-chip-avatar-leading-margin-top),
var(--ion-chip-avatar-leading-margin-end),
var(--ion-chip-avatar-leading-margin-bottom),
var(--ion-chip-avatar-leading-margin-start)
var(--ion-chip-avatar-first-margin-top),
var(--ion-chip-avatar-first-margin-end),
var(--ion-chip-avatar-first-margin-bottom),
var(--ion-chip-avatar-first-margin-start)
);
}

::slotted(ion-avatar:last-child) {
@include mixins.margin(
var(--ion-chip-avatar-trailing-margin-top),
var(--ion-chip-avatar-trailing-margin-end),
var(--ion-chip-avatar-trailing-margin-bottom),
var(--ion-chip-avatar-trailing-margin-start)
var(--ion-chip-avatar-last-margin-top),
var(--ion-chip-avatar-last-margin-end),
var(--ion-chip-avatar-last-margin-bottom),
var(--ion-chip-avatar-last-margin-start)
);
}
201 changes: 201 additions & 0 deletions core/src/components/item-divider/item-divider.interfaces.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
import type { IonPadding, IonMargin } from '../../themes/themes.interfaces';

export type IonItemDividerRecipe = {
background?: string;
color?: string;
minHeight?: string;

padding?: IonPadding;

inner?: {
padding?: IonPadding;
};

border?: {
bottom?: string;
};

font?: {
size?: string;
weight?: string;
};

leading?: {
// Targets `:host([slot="start"])`
anchor?: {
margin?: IonMargin;
};

// Targets `::slotted([slot="start"])`
edge?: {
margin?: IonMargin;
};
};

trailing?: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something I noticed: trailing means slot="end" here (and in icon.trailing, avatar.trailing, etc.), but down on header2.trailing (line 141) it means :last-child which is the same meaning chip uses for trailing. So the same word means two different things within the same recipe. The anchor/edge vocabulary helps but I think this could still trip people up when working across recipes. Worth thinking about whether there's a clearer way to distinguish these?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about this? I also had to update it on chip. b9c7961

// Targets `::slotted([slot="end"])`
edge?: {
margin?: IonMargin;
};
};
Comment on lines +23 to +40
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Naming Convention: Anchors & Edges

To maintain consistency with the Ionic Modular architecture established in ion-chip, this component adopts a shared spatial vocabulary. While chips use DOM order (:first-child), dividers use named slots (slot="start/end"). The following naming convention bridges that gap:

  • Anchors (:host): Refers to the component's own placement within a parent container.
    • leading-anchor: Targets :host([slot="start"]).
    • trailing-anchor: Targets :host([slot="end"]).
  • Edges (::slotted): Refers to content placed at the boundaries of the component itself.
    • leading-edge: Targets ::slotted([slot="start"]).
    • trailing-edge: Targets ::slotted([slot="end"]).

Why this matters:
This mirrors the leading (:first-child) and trailing (:last-child) pattern used in chips. By using leading/trailing instead of left/right or start/end, we create a less confusing structure that developers can use with ease.


label?: {
margin?: IonMargin;
};

icon?: {
font?: {
size?: string;
};

leading?: {
// Targets `::slotted([slot="start"])`
edge?: {
margin?: IonMargin;
};
};

trailing?: {
// Targets `::slotted([slot="end"])`
edge?: {
margin?: IonMargin;
};
};

// Default non-semantic states
default?: {
color?: string;
};

// Any of the semantic colors like primary, secondary, etc.
semantic?: {
default?: {
color?: string;
};
};
Comment on lines +66 to +75
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This follows the same structure established in chip when it came to default vs semantic colors.

};

note?: {
align?: {
self?: string;
};

font?: {
size?: string;
};

margin?: IonMargin;
padding?: IonPadding;
};

avatar?: {
height?: string;
width?: string;

margin?: IonMargin;

leading?: {
// Targets `::slotted([slot="start"])`
edge?: {
margin?: IonMargin;
};
};

trailing?: {
// Targets `::slotted([slot="end"])`
edge?: {
margin?: IonMargin;
};
};
};

thumbnail?: {
height?: string;
width?: string;

margin?: IonMargin;

leading?: {
// Targets `::slotted([slot="start"])`
edge?: {
margin?: IonMargin;
};
};

trailing?: {
// Targets `::slotted([slot="end"])`
edge?: {
margin?: IonMargin;
};
};
};

header1?: {
margin?: IonMargin;
};

header2?: {
margin?: IonMargin;

// Targets `:last-child`
last?: {
margin?: IonMargin;
};
};

header3?: {
margin?: IonMargin;

// Targets `:last-child`
last?: {
margin?: IonMargin;
};
};

header4?: {
margin?: IonMargin;

// Targets `:last-child`
last?: {
margin?: IonMargin;
};
};

header5?: {
margin?: IonMargin;

// Targets `:last-child`
last?: {
margin?: IonMargin;
};
};

header6?: {
margin?: IonMargin;

// Targets `:last-child`
last?: {
margin?: IonMargin;
};
};

paragraph?: {
color?: string;
overflow?: string;

margin?: IonMargin;

font?: {
size?: string;
};

text?: {
overflow?: string;
};

// Targets `:last-child`
last?: {
margin?: IonMargin;
};
};
};
Loading
Loading