Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 22 additions & 0 deletions core/src/components/input/input.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,25 @@
:host(.input-disabled) {
opacity: #{$input-ios-disabled-opacity};
}

// Start/End Slots
// ----------------------------------------------------------------

/**
* Slotted buttons have a lot of default padding that can
* cause them to look misaligned from other pieces such
* as the control's label, especially when using a clear
* fill. We also make them circular to ensure that non-
* clear buttons and the focus/hover state on clear ones
* don't look too crowded.
*/
::slotted(ion-button[slot="start"].button-has-icon-only),
::slotted(ion-button[slot="end"].button-has-icon-only) {
--border-radius: 50%;
--padding-start: 0;
--padding-end: 0;
--padding-top: 0;
--padding-bottom: 0;

aspect-ratio: 1;
}
24 changes: 24 additions & 0 deletions core/src/components/input/input.md.scss
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,27 @@
:host(.input-shape-round) {
--border-radius: 16px;
}

// Start/End Slots
// ----------------------------------------------------------------

/**
* Slotted buttons have a lot of default padding that can
* cause them to look misaligned from other pieces such
* as the control's label, especially when using a clear
* fill. We also make them circular to ensure that non-
* clear buttons and the focus/hover state on clear ones
* don't look too crowded.
*/
::slotted(ion-button[slot="start"].button-has-icon-only),
::slotted(ion-button[slot="end"].button-has-icon-only) {
--border-radius: 50%;
--padding-start: 8px;
--padding-end: 8px;
--padding-top: 8px;
--padding-bottom: 8px;

aspect-ratio: 1;

min-height: 40px;
}
2 changes: 2 additions & 0 deletions core/src/components/input/input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -659,8 +659,10 @@

::slotted([slot="start"]) {
margin-inline-end: $form-control-label-margin;
margin-inline-start: 0;
}

::slotted([slot="end"]) {
margin-inline-start: $form-control-label-margin;
margin-inline-end: 0;
}
8 changes: 6 additions & 2 deletions core/src/components/input/test/slot/input.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ configs().forEach(({ title, screenshot, config }) => {
`
<ion-input label-placement="start" fill="solid" value="100" label="Weight" clear-input="true">
<ion-icon slot="start" name="barbell" aria-hidden="true"></ion-icon>
<ion-label slot="end">lbs</ion-label>
<ion-button slot="end" aria-label="Show/hide password">
<ion-icon slot="icon-only" name="lock-closed" aria-hidden="true"></ion-icon>
</ion-button>
</ion-input>
`,
config
Expand All @@ -23,7 +25,9 @@ configs().forEach(({ title, screenshot, config }) => {
`
<ion-input label-placement="floating" fill="solid" value="100" label="Weight" clear-input="true">
<ion-icon slot="start" name="barbell" aria-hidden="true"></ion-icon>
<ion-label slot="end">lbs</ion-label>
<ion-button slot="end" aria-label="Show/hide password">
<ion-icon slot="icon-only" name="lock-closed" aria-hidden="true"></ion-icon>
</ion-button>
</ion-input>
`,
config
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions core/src/components/select/select.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,25 @@
:host(.select-disabled) {
opacity: $select-ios-disabled-opacity;
}

// Start/End Slots
// ----------------------------------------------------------------

/**
* Slotted buttons have a lot of default padding that can
* cause them to look misaligned from other pieces such
* as the control's label, especially when using a clear
* fill. We also make them circular to ensure that non-
* clear buttons and the focus/hover state on clear ones
* don't look too crowded.
*/
::slotted(ion-button[slot="start"].button-has-icon-only),
::slotted(ion-button[slot="end"].button-has-icon-only) {
--border-radius: 50%;
--padding-start: 0;
--padding-end: 0;
--padding-top: 0;
--padding-bottom: 0;

aspect-ratio: 1;
}
24 changes: 24 additions & 0 deletions core/src/components/select/select.md.scss
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,27 @@
:host(.select-disabled) {
opacity: $select-md-disabled-opacity;
}

// Start/End Slots
// ----------------------------------------------------------------

/**
* Slotted buttons have a lot of default padding that can
* cause them to look misaligned from other pieces such
* as the control's label, especially when using a clear
* fill. We also make them circular to ensure that non-
* clear buttons and the focus/hover state on clear ones
* don't look too crowded.
*/
::slotted(ion-button[slot="start"].button-has-icon-only),
::slotted(ion-button[slot="end"].button-has-icon-only) {
--border-radius: 50%;
--padding-start: 8px;
--padding-end: 8px;
--padding-top: 8px;
--padding-bottom: 8px;

aspect-ratio: 1;

min-height: 40px;
}
2 changes: 2 additions & 0 deletions core/src/components/select/select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -592,8 +592,10 @@ button {

::slotted([slot="start"]) {
margin-inline-end: $form-control-label-margin;
margin-inline-start: 0;
}

::slotted([slot="end"]) {
margin-inline-start: $form-control-label-margin;
margin-inline-end: 0;
}
8 changes: 6 additions & 2 deletions core/src/components/select/test/slot/select.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ configs().forEach(({ title, screenshot, config }) => {
`
<ion-select label-placement="start" fill="solid" placeholder="Select weight" label="Weight">
<ion-icon slot="start" name="barbell" aria-hidden="true"></ion-icon>
<ion-label slot="end">lbs</ion-label>
<ion-button slot="end" aria-label="Show/hide password">
<ion-icon slot="icon-only" name="lock-closed" aria-hidden="true"></ion-icon>
</ion-button>
</ion-select>
`,
config
Expand All @@ -23,7 +25,9 @@ configs().forEach(({ title, screenshot, config }) => {
`
<ion-select label-placement="floating" fill="solid" placeholder="Select weight" label="Weight">
<ion-icon slot="start" name="barbell" aria-hidden="true"></ion-icon>
<ion-label slot="end">lbs</ion-label>
<ion-button slot="end" aria-label="Show/hide password">
<ion-icon slot="icon-only" name="lock-closed" aria-hidden="true"></ion-icon>
</ion-button>
</ion-select>
`,
config
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions core/src/components/textarea/test/slot/textarea.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ configs().forEach(({ title, screenshot, config }) => {
`
<ion-textarea label-placement="start" fill="solid" value="100" label="Weight">
<ion-icon slot="start" name="barbell" aria-hidden="true"></ion-icon>
<ion-label slot="end">lbs</ion-label>
<ion-button slot="end" aria-label="Show/hide password">
<ion-icon slot="icon-only" name="lock-closed" aria-hidden="true"></ion-icon>
</ion-button>
</ion-textarea>
`,
config
Expand All @@ -23,7 +25,9 @@ configs().forEach(({ title, screenshot, config }) => {
`
<ion-textarea label-placement="floating" fill="solid" value="100" label="Weight">
<ion-icon slot="start" name="barbell" aria-hidden="true"></ion-icon>
<ion-label slot="end">lbs</ion-label>
<ion-button slot="end" aria-label="Show/hide password">
<ion-icon slot="icon-only" name="lock-closed" aria-hidden="true"></ion-icon>
</ion-button>
</ion-textarea>
`,
config
Expand Down
22 changes: 22 additions & 0 deletions core/src/components/textarea/textarea.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,25 @@
:host(.textarea-disabled) {
opacity: #{$textarea-ios-disabled-opacity};
}

// Start/End Slots
// ----------------------------------------------------------------

/**
* Slotted buttons have a lot of default padding that can
* cause them to look misaligned from other pieces such
* as the control's label, especially when using a clear
* fill. We also make them circular to ensure that non-
* clear buttons and the focus/hover state on clear ones
* don't look too crowded.
*/
::slotted(ion-button[slot="start"].button-has-icon-only),
::slotted(ion-button[slot="end"].button-has-icon-only) {
--border-radius: 50%;
--padding-start: 0;
--padding-end: 0;
--padding-top: 0;
--padding-bottom: 0;

aspect-ratio: 1;
}
24 changes: 24 additions & 0 deletions core/src/components/textarea/textarea.md.scss
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,27 @@
:host(.textarea-shape-round) {
--border-radius: 16px;
}

// Start/End Slots
// ----------------------------------------------------------------

/**
* Slotted buttons have a lot of default padding that can
* cause them to look misaligned from other pieces such
* as the control's label, especially when using a clear
* fill. We also make them circular to ensure that non-
* clear buttons and the focus/hover state on clear ones
* don't look too crowded.
*/
::slotted(ion-button[slot="start"].button-has-icon-only),
::slotted(ion-button[slot="end"].button-has-icon-only) {
--border-radius: 50%;
--padding-start: 8px;
--padding-end: 8px;
--padding-top: 8px;
--padding-bottom: 8px;

aspect-ratio: 1;

min-height: 40px;
}
2 changes: 2 additions & 0 deletions core/src/components/textarea/textarea.scss
Original file line number Diff line number Diff line change
Expand Up @@ -753,8 +753,10 @@

::slotted([slot="start"]) {
margin-inline-end: $form-control-label-margin;
margin-inline-start: 0;
}

::slotted([slot="end"]) {
margin-inline-start: $form-control-label-margin;
margin-inline-end: 0;
}