Skip to content

Commit 40e610d

Browse files
BenOsodracIonitronbrandyscarney
authored
fix(card): fix tokens on ionic theme (#30441)
Issue number: internal --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Updated typography tokens. - Added border styles and CSS variables for easier customization. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> [Ionic theme card](https://ionic-framework-git-rou-11968-card-ionic1.vercel.app/src/components/card/test/theme-ionic) --------- Co-authored-by: ionitron <[email protected]> Co-authored-by: Brandy Smith <[email protected]>
1 parent b57d163 commit 40e610d

15 files changed

+16
-9
lines changed

core/src/components/card-content/card-content.ionic.scss

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,13 @@
66

77
.card-content-ionic {
88
@include globals.padding(globals.$ion-space-400);
9+
@include globals.typography(globals.$ion-body-md-regular);
910

1011
display: flex;
1112

1213
flex-direction: column;
1314

14-
font-size: globals.$ion-font-size-350;
15-
16-
line-height: globals.$ion-font-line-height-600;
17-
18-
gap: globals.$ion-space-200;
15+
gap: globals.$ion-space-400;
1916

2017
img {
2118
@include globals.margin(globals.$ion-space-200, 0, globals.$ion-space-200, 0);

core/src/components/card/card.ionic.scss

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@
66

77
:host {
88
--background: #{globals.$ion-primitives-base-white};
9-
--border-radius: #{globals.$ion-border-radius-400};
9+
--border-width: #{globals.$ion-border-size-025};
10+
--border-color: #{globals.$ion-border-default};
11+
--border-style: #{globals.$ion-border-style-solid};
12+
--border-radius: #{globals.$ion-round-xl};
1013
--color: #{globals.$ion-primitives-neutral-1200};
14+
min-width: globals.$ion-scale-2400;
15+
16+
border: var(--border-width) var(--border-style) var(--border-color);
1117
}
1218

1319
::slotted(img) {
@@ -18,9 +24,13 @@
1824
// ---------------------------------------------
1925

2026
:host(.card-soft) {
21-
--border-radius: #{globals.$ion-border-radius-200};
27+
--border-radius: #{globals.$ion-soft-xl};
28+
}
29+
30+
:host(.card-round) {
31+
--border-radius: #{globals.$ion-round-xl};
2232
}
2333

2434
:host(.card-rectangular) {
25-
--border-radius: #{globals.$ion-border-radius-0};
35+
--border-radius: #{globals.$ion-rectangular-xl};
2636
}

core/src/components/card/test/theme-ionic/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</ion-toolbar>
3333
</ion-header>
3434

35-
<ion-content class="ionic-padding-space-400" id="content" no-bounce>
35+
<ion-content class="ion-padding-space-400" id="content" no-bounce>
3636
<h4>Preview options</h4>
3737

3838
<p>

0 commit comments

Comments
 (0)