fix(item, item-divider): slotted spacing is correct #29103
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue number: Internal
What is the current behavior?
As part of my work for removing the deprecated
ion-item
features, I updated a selector for slotted notes. This caused the following visual diff:This is happening because of the lines below the selector:
Previously,
::slotted(ion-note[slot]:not([slot="helper"]):not([slot="error"]))
won out over the styles because it had a higher specificity, and the left/right padding was always 0.When the selector changed to
::slotted(ion-note[slot])
that caused the selector to have the same specificity as the other selectors. Since the other selectors were defined later, those styles began to win out. I initially thought that fixing this was a matter of updating the specificity.However, when doing a git blame I learned that the new selector (
::slotted(ion-note[slot])
) was what was there originally and the selector was changed in feature. This work was done during a time where we did not have great screenshot test coverage, so it's likely that this diff was not caught.We also discovered that the margin on slotted content was larger than it needed to be. With this change, slotted notes had a padding of 16px in addition to the slot itself having a margin of 32px. After comparing with the MD2 spec, this behavior is incorrect. The space between the slot and the content should always be 16px:
What is the new behavior?
Does this introduce a breaking change?
Other information