Repository navigation
feat(label): convert to shadow DOM #31657
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
base: next
Are you sure you want to change the base?
Changes from all commits
5a4715b
9ac2d3b
38b4217
c139b14
9056bf4
3a909f4
24e8293
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -74,13 +74,9 @@ <h2>H2 Title Text</h2> | |
|
|
||
| <ion-item> | ||
| <ion-label> | ||
| <ion-text color="primary"> | ||
| <h3>H3 Title Text</h3> | ||
| </ion-text> | ||
| <h3><ion-text color="primary">H3 Title Text</ion-text></h3> | ||
|
Member
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. In shadow DOM, label's |
||
| <p>Paragraph line 1</p> | ||
| <ion-text color="secondary"> | ||
| <p>Paragraph line 2 secondary</p> | ||
| </ion-text> | ||
| <p><ion-text color="secondary">Paragraph line 2 secondary</ion-text></p> | ||
| </ion-label> | ||
| </ion-item> | ||
|
|
||
|
|
||
|
Member
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. The 3px comes from the markup change, not the shadow conversion. The |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,47 +22,35 @@ | |
| :host(.label-floating) { | ||
| @include margin(null, null, 0, null); | ||
| @include transform(translate(0, 29px)); | ||
| @include transform-origin(start, top); | ||
|
Member
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. This was moved to |
||
|
|
||
| transition: transform 150ms ease-in-out; | ||
| } | ||
|
|
||
| :host-context(.item-textarea).label-floating { | ||
| @include transform(translate(0, 28px)); | ||
| } | ||
|
|
||
| :host-context(.item-has-focus).label-stacked, | ||
| :host-context(.item-has-focus).label-floating { | ||
| color: $label-ios-text-color-focused; | ||
| } | ||
|
|
||
| :host-context(.item-has-focus).label-floating, | ||
| :host-context(.item-has-placeholder:not(.item-input)).label-floating, | ||
| :host-context(.item-has-value).label-floating { | ||
| @include transform(scale(0.82)); | ||
| } | ||
|
|
||
| // iOS Typography | ||
| // -------------------------------------------------- | ||
|
|
||
| ::slotted(*) h1 { | ||
| ::slotted(h1) { | ||
| @include margin(3px, 0, 2px); | ||
|
|
||
| font-size: dynamic-font(22px); | ||
| font-weight: normal; | ||
|
|
||
| line-height: 1.2; | ||
| } | ||
|
|
||
| ::slotted(*) h2 { | ||
| ::slotted(h2) { | ||
| @include margin(0, 0, 2px); | ||
|
|
||
| font-size: dynamic-font(17px); | ||
| font-weight: normal; | ||
|
|
||
| line-height: 1.2; | ||
| } | ||
|
|
||
| ::slotted(*) h3, | ||
| ::slotted(*) h4, | ||
| ::slotted(*) h5, | ||
| ::slotted(*) h6 { | ||
| ::slotted(h3), | ||
| ::slotted(h4), | ||
| ::slotted(h5), | ||
| ::slotted(h6) { | ||
| @include margin(0, 0, 3px); | ||
|
|
||
| font-size: dynamic-font(14px); | ||
|
|
@@ -71,14 +59,16 @@ | |
| line-height: normal; | ||
| } | ||
|
|
||
| ::slotted(*) p { | ||
| ::slotted(p) { | ||
| @include margin( | ||
| $item-ios-paragraph-margin-top, | ||
| $item-ios-paragraph-margin-end, | ||
| $item-ios-paragraph-margin-bottom, | ||
| $item-ios-paragraph-margin-start | ||
| ); | ||
|
|
||
| color: #{$item-ios-paragraph-text-color}; | ||
|
|
||
| font-size: $item-ios-paragraph-font-size; | ||
|
|
||
| line-height: normal; | ||
|
|
@@ -88,19 +78,15 @@ | |
| overflow: inherit; | ||
| } | ||
|
|
||
| ::slotted(p) { | ||
| color: #{$item-ios-paragraph-text-color}; | ||
| } | ||
|
|
||
| :host(.in-item-color)::slotted(p) { | ||
| :host(.in-item-color) ::slotted(p) { | ||
| color: inherit; | ||
| } | ||
|
|
||
| ::slotted(*) h2:last-child, | ||
| ::slotted(*) h3:last-child, | ||
| ::slotted(*) h4:last-child, | ||
| ::slotted(*) h5:last-child, | ||
| ::slotted(*) h6:last-child, | ||
| ::slotted(*) p:last-child { | ||
| ::slotted(h2:last-child), | ||
| ::slotted(h3:last-child), | ||
| ::slotted(h4:last-child), | ||
| ::slotted(h5:last-child), | ||
| ::slotted(h6:last-child), | ||
| ::slotted(p:last-child) { | ||
| @include margin(null, null, 0, null); | ||
| } | ||
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.
The
item-has-focusclass was removed from item in v8 when we removed the legacy input support so these lines can be deleted: