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

fix(expressive): remove productive mixin from component styles and replace with expressive tokens #4957

Merged
290 changes: 150 additions & 140 deletions packages/react/src/__tests__/__snapshots__/storyshots.test.js.snap

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/react/src/components/LogoGrid/LogoGrid.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright IBM Corp. 2016, 2020
* Copyright IBM Corp. 2016, 2021
*
* 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 @@ -31,7 +31,7 @@ const LogoGrid = ({ heading, logosGroup, ctaCopy, ctaHref, hideBorder }) => {
cta = {
style: 'card',
type: 'local',
copy: ctaCopy,
heading: ctaCopy,
cta: {
href: ctaHref,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

:host(#{$dds-prefix}-callout-data-source),
.#{$prefix}--callout-data__source {
@include carbon--type-style('body-short-01', true);
@include carbon--type-style('caption-01');

width: 90%;
max-width: carbon--mini-units(80);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright IBM Corp. 2016, 2020
// Copyright IBM Corp. 2016, 2021
//
// 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 @@ -66,8 +66,7 @@
.#{$prefix}--callout__content
.#{$prefix}--content-block {
.#{$prefix}--image__caption {
@include use-carbon-productive-tokens();
@include carbon--type-style('body-short-01', true);
@include carbon--type-style('caption-01');

margin-top: $carbon--spacing-03;
color: $text-01;
Expand Down
13 changes: 2 additions & 11 deletions packages/styles/scss/components/card/index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright IBM Corp. 2016, 2020
* Copyright IBM Corp. 2016, 2021
*
* 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 @@ -94,14 +94,6 @@
padding: 0;
}

.#{$prefix}--card__video {
.#{$prefix}--card__footer span {
color: $text-02;
@include use-carbon-productive-tokens();
@include carbon--type-style('body-short-01');
}
}

&.#{$prefix}--link:focus,
.#{$prefix}--link:focus {
outline: 2px solid $focus;
Expand All @@ -111,8 +103,7 @@

:host(#{$dds-prefix}-card-eyebrow),
.#{$prefix}--card__eyebrow {
@include use-carbon-productive-tokens();
@include carbon--type-style('body-short-01');
@include carbon--type-style('label-01');

margin-bottom: $carbon--spacing-03;
color: $text-02;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@
.#{$prefix}--content-item-horizontal__item--eyebrow {
color: $text-05;
padding-bottom: $spacing-03;
@include use-carbon-productive-tokens();
@include carbon--type-style('body-long-01');
@include carbon--type-style('label-01');
}

:host(#{$dds-prefix}-content-item-horizontal) ::slotted([slot='heading']),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright IBM Corp. 2016, 2020
* Copyright IBM Corp. 2016, 2021
*
* 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 @@ -87,8 +87,7 @@
}

.#{$prefix}--image__caption {
@include use-carbon-productive-tokens();
@include carbon--type-style('body-short-01', true);
@include carbon--type-style('caption-01');

margin-top: $carbon--spacing-03;
color: $text-05;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@
margin-right: $carbon--spacing-03;
}

@include use-carbon-productive-tokens();
@include carbon--type-style(body-short-01, true);
@include carbon--type-style('caption-01');
}

.#{$prefix}--modal-header__heading {
Expand Down Expand Up @@ -259,8 +258,7 @@
padding: $carbon--spacing-05;
min-height: $carbon--spacing-09;

@include use-carbon-productive-tokens();
@include carbon--type-style(heading-01, true);
@include carbon--type-style(heading-02);
}

.#{$prefix}--locale-modal__list {
Expand Down
14 changes: 8 additions & 6 deletions packages/styles/scss/components/logo-grid/_logo-grid.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright IBM Corp. 2016, 2020
* Copyright IBM Corp. 2016, 2021
*
* 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 @@ -48,11 +48,6 @@
@include carbon--breakpoint('md') {
@include carbon--make-col(1, 3);
}

.#{$prefix}--card__heading {
@include use-carbon-productive-tokens();
@include carbon--type-style('productive-heading-01');
}
}

a.#{$prefix}--card__CTA {
Expand Down Expand Up @@ -133,6 +128,13 @@
:host(#{$dds-prefix}-logo-grid-link) ::slotted(svg) {
fill: $link-01;
}

:host(#{$dds-prefix}-logo-grid-link) ::slotted(#{$dds-prefix}-card-heading),
.#{$prefix}--logo-grid
.#{$prefix}--content-block__cta
.#{$prefix}--card__heading {
@include carbon--type-style('productive-heading-01');
}
}
@include exports('logo-grid') {
@include logo-grid;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright IBM Corp. 2016, 2020
* Copyright IBM Corp. 2016, 2021
*
* 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 @@ -56,8 +56,7 @@ $aspect-ratios: ((16, 9), (9, 16), (2, 1), (1, 2), (4, 3), (3, 4), (1, 1));
}

.#{$prefix}--video-player__video-caption {
@include use-carbon-productive-tokens();
@include carbon--type-style(body-long-01, true);
@include carbon--type-style('caption-01');

padding-top: var(--#{$dds-prefix}--video-caption--padding, $spacing-05);
color: var(--#{$dds-prefix}--video-caption--color, $text-05);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import '../logo-grid';
import '../../content-block/content-block-heading';
import '../logo-grid-item';
import '../logo-grid-link';
import '../../card/card-heading';
import ArrowRight20 from 'carbon-web-components/es/icons/arrow--right/20';
import { boolean } from '@storybook/addon-knobs';
import { html } from 'lit-element';
Expand All @@ -32,7 +33,7 @@ export const Default = ({ parameters }) => {
`
)}
<dds-logo-grid-link href="${ctaHref}">
<p>${ctaCopy}</p>
<dds-card-heading>${ctaCopy}</dds-card-heading>
${ArrowRight20({ slot: 'footer' })}
</dds-logo-grid-link>
</dds-logo-grid>
Expand Down