Skip to content
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

feat(link-with-icon): upgrade v2 styles #11009

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
1 change: 1 addition & 0 deletions docs/dotcom-v2-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ For Carbon v11 migration guidance, see their
| leadspace | View changes [here](#leadspace) |
| leadspace-with-search | View changes [here](#leadspace-with-search) |
| link-list-section | This component is deprecated in v2 in favor for content-section/block & link-list end of section variant components |
| link-with-icon | No API changes. |
| logo-grid | This component is deprecated in v2 in favor for content-section/block & image-group components |
| pictogram-item | This component is deprecated in v2 in favor for content-item (pictogram variation) componet |
| quote | No API changes. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,8 @@
:host(#{$c4d-prefix}-link-list-item),
:host(#{$c4d-prefix}-link-list-item-cta),
:host(#{$c4d-prefix}-text-cta) {
display: flex;

span {
vertical-align: middle;
align-self: center;
flex: 1;
}

svg,
Expand All @@ -46,6 +42,11 @@
}
}

// Re-define the ruleset so this wins over `.cds--link:visited`, etc.
.#{$prefix}--link--disabled {
color: $text-disabled;
}

&.#{$prefix}--link-with-icon__icon-left,
.#{$prefix}--link-with-icon.#{$prefix}--link-with-icon--inline-icon.#{$prefix}--link-with-icon__icon-left {
display: flex;
Expand Down Expand Up @@ -78,8 +79,7 @@
text-underline-position: under;
}

svg,
::slotted(svg[slot='icon']) {
svg {
display: inline;
vertical-align: middle;
white-space: nowrap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,4 @@
// LICENSE file in the root directory of this source tree.
//

@use '@carbon/styles/scss/breakpoint' as *;
@use '@carbon/styles/scss/config' as *;
@use '@carbon/styles/scss/spacing' as *;
@use '@carbon/styles/scss/theme' as *;
@use '@carbon/ibmdotcom-styles/scss/components/link-with-icon';
@use '@carbon/ibmdotcom-styles/scss/globals/vars' as *;

:host(#{$c4d-prefix}-link-with-icon),
:host(#{$c4d-prefix}-link-list-item),
:host(#{$c4d-prefix}-text-cta),
:host(#{$c4d-prefix}-link-list-item-cta) {
// Re-define the ruleset so this wins over `.cds--link:visited`, etc.
.#{$prefix}--link--disabled {
color: $text-disabled;
}
}

:host(#{$c4d-prefix}-link-list-item) {
.#{$prefix}--link {
align-content: flex-start;

span,
::slotted(svg[slot='icon']) {
align-self: flex-start;
}
}
}

:host(#{$c4d-prefix}-link-list-item)[type='end'] {
.#{$prefix}--link-with-icon__icon-left ::slotted(svg[slot='icon']) {
margin-right: $spacing-07;
}

.#{$prefix}--link-with-icon__icon-right ::slotted(svg[slot='icon']) {
margin-left: $spacing-07;
}
}
Loading