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(tabs-extended): update to v11 styles and deprecate vertical variant #11086

Merged
Show file tree
Hide file tree
Changes from 9 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
12 changes: 10 additions & 2 deletions docs/dotcom-v2-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ For Carbon v11 migration guidance, see their
| scroll-animations | No API changes. |
| search-with-typeahead | No API changes. |
| table-of-contents | No API changes. |
| tabs-extended-media | Deprecated in favor of `tabs-extended`. |
| tabs-extended | View [changes](#tabs-extended) |
| tabs-extended-media | Deprecated in favor of [`tabs-extended`](#tabs-extended). |
| tag-group | Deprecated in favor of wrapping Carbon `tag` in a parent container. |
| tag-link | Deprecated in favor of Carbon `tag`. |
| universal-banner | View [changes](#universal-banner) |
Expand Down Expand Up @@ -100,7 +101,8 @@ For Carbon v11 migration guidance, see their
### Card group

- Removed `outline` property
- New grid mode options: `Default` with a 32px gap, `Narrow` with a 16px gap, and `Condensed` with no gaps inbetween
- New grid mode options: `Default` with a 32px gap, `Narrow` with a 16px gap,
and `Condensed` with no gaps inbetween
- Grid mode options `Collapsed` has been replaced with `Condensed`
- Removed grid mode option `Border`
- Deprecated `card-link` option in Card group
Expand Down Expand Up @@ -181,8 +183,14 @@ information.
- `link-list-item-card-cta` has been replaced with `link-list-item-cta`

### Quote

- Removed `color-scheme` `inverse` option in favor of `callout-quote (inverse)`

### Tabs extended

- `vertical` variant has been deprecated
- `contained` type has been added

### Universal banner

- `universal-banner` renamed to `global-banner`
53 changes: 24 additions & 29 deletions packages/styles/scss/components/card-group/_card-group.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright IBM Corp. 2016, 2022
* Copyright IBM Corp. 2016, 2023
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
Expand All @@ -23,7 +23,23 @@

@mixin card-group {
:host(#{$c4d-prefix}-card-group) {
--#{$c4d-prefix}--card-group--cards-in-row: 1;

display: grid;
grid-template-columns: 1fr;
gap: 1px;
background: none;

@include breakpoint(md) {
grid-template-columns: repeat(2, 1fr);
}

@include breakpoint(lg) {
grid-template-columns: repeat(
var(--#{$c4d-prefix}--card-group--cards-in-row),
1fr
);
}
}

:host(#{$c4d-prefix}-card-group[with-card-in-card][grid-mode]) {
Expand All @@ -32,20 +48,19 @@
padding-right: 1px;
}

:host(#{$c4d-prefix}-card-group[with-card-in-card][grid-mode="default"]) {
:host(#{$c4d-prefix}-card-group[with-card-in-card][grid-mode='default']) {
padding-top: $spacing-07;
}

:host(#{$c4d-prefix}-card-group[with-card-in-card][grid-mode="narrow"]) {
:host(#{$c4d-prefix}-card-group[with-card-in-card][grid-mode='narrow']) {
padding-top: $spacing-05;
}
}

:host(#{$c4d-prefix}-card-group-item) {

.#{$prefix}--card {
border: 0;
outline: 1px solid $border-tile-01;
outline-offset: 0px;
outline-offset: 0;
}

.#{$prefix}--image {
Expand All @@ -72,7 +87,7 @@
}
}

:host(#{$c4d-prefix}-card-group-item[href=""]) {
:host(#{$c4d-prefix}-card-group-item[href='']) {
.#{$prefix}--card {
outline: none;
}
Expand All @@ -83,7 +98,6 @@
}

:host(#{$c4d-prefix}-card-group-item[link]) {

::slotted(#{$c4d-prefix}-card-heading) {
@include type-style('heading-02');

Expand All @@ -93,25 +107,6 @@
.#{$prefix}--card .#{$prefix}--card__copy {
margin-top: 0;
}
}

:host(#{$c4d-prefix}-card-group) {
--#{$c4d-prefix}--card-group--cards-in-row: 1;

display: grid;
grid-template-columns: 1fr;
gap: 1px;

@include breakpoint(md) {
grid-template-columns: repeat(2, 1fr);
}

@include breakpoint(lg) {
grid-template-columns: repeat(
var(--#{$c4d-prefix}--card-group--cards-in-row),
1fr
);
}
}

:host(#{$c4d-prefix}-card-group)[grid-mode='narrow'] {
Expand All @@ -136,7 +131,7 @@
padding-top: $spacing-05;
gap: $spacing-07;
}
}
}

:host(#{$c4d-prefix}-card-group)[grid-mode='condensed'] {
@include breakpoint(sm) {
Expand All @@ -147,7 +142,7 @@
@include breakpoint(md) {
padding-top: $spacing-05;
}
}
}

// card with video focus outline
:host(#{$c4d-prefix}-card-group-item)[cta-type='video'] {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright IBM Corp. 2016, 2022
* Copyright IBM Corp. 2016, 2023
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
Expand Down Expand Up @@ -163,7 +163,6 @@
:host(#{$c4d-prefix}-card-in-card)[grid-mode='default'],
.#{$prefix}--card-in-card--narrow {
.#{$prefix}--card__wrapper {

@include breakpoint(md) {
width: calc(50% - #{$spacing-05} + #{rem(1px)});
}
Expand Down
9 changes: 0 additions & 9 deletions packages/styles/scss/components/card/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,7 @@
:host(#{$c4d-prefix}-content-group-cards-item),
:host(#{$c4d-prefix}-content-group-cards-item) .#{$prefix}--card {
@include tile($enable-experimental-tile-contrast: true);
}

:host(#{$c4d-prefix}-card),
:host(#{$c4d-prefix}-region-item) .#{$prefix}--link,
:host(#{$c4d-prefix}-card-group-item),
:host(#{$c4d-prefix}-card-group-item) .#{$prefix}--card,
:host(#{$c4d-prefix}-card-cta),
:host(#{$c4d-prefix}-card-in-card),
:host(#{$c4d-prefix}-content-group-cards-item),
:host(#{$c4d-prefix}-content-group-cards-item) .#{$prefix}--card {
position: relative;
display: flex;
flex-direction: column;
Expand Down
Loading
Loading