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(ibmdotcom-styles) remove react classes from component styles #11218

Draft
wants to merge 44 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
c228064
feat(ibmdotcom styles): remove react classes card compoenent
sangeethababu9223 Dec 12, 2023
211bcf7
feat(ibmdotcom styles): remove react classes content block horizontal
sangeethababu9223 Dec 12, 2023
049887e
feat(ibmdotco styles): remove react classes from content block media
sangeethababu9223 Dec 12, 2023
c21f653
feat(ibmdtcom styles): remove react classes content block mixed
sangeethababu9223 Dec 12, 2023
0c92396
feat(ibmdotcom styles): remove react classes from content block segme…
sangeethababu9223 Dec 12, 2023
8adf87b
feat(ibmdotcom styles): remove react classes from content block sample
sangeethababu9223 Dec 12, 2023
91ee9e1
feat(ibmdotcom styles): remove react classes from content group cards
sangeethababu9223 Dec 12, 2023
9f25367
feat(ibmdotcom styles): remove react classes from content group picto…
sangeethababu9223 Dec 12, 2023
d689252
feat(ibmdotcom styles): remove react classes from content group simple
sangeethababu9223 Dec 12, 2023
c18a8f0
feat(ibmdotcom styles): remove react classes from content item row
sangeethababu9223 Dec 12, 2023
540b92e
feat(ibmdotcom styles): remove react classes from cta block
sangeethababu9223 Dec 12, 2023
21a5a53
feat(ibmdotcom styles): remove react classes from cta section
sangeethababu9223 Dec 12, 2023
e8863cd
feat(ibmdotcom styles): remove react classes from expressive modal
sangeethababu9223 Dec 12, 2023
bd0cde5
feat(ibmdotcom styles): remove react classes from feature card
sangeethababu9223 Dec 12, 2023
1d6a788
feat(ibmdotcom styles): remove react classes from in page banner
sangeethababu9223 Dec 13, 2023
eac726d
feat(ibmdotcom styles): remove react classes from leadspace block
sangeethababu9223 Dec 13, 2023
5a9c0ea
feat(ibmdotcom styles): remove react classes from light media viewer
sangeethababu9223 Dec 13, 2023
ee72562
feat(ibmdotcom styles): remove react classes from link list
sangeethababu9223 Dec 13, 2023
73344c1
feat(ibmdotcom styles): remove react classes from logo grid
sangeethababu9223 Dec 13, 2023
c831a3f
feat(ibmdotcom styles): remove react classes from quote
sangeethababu9223 Dec 13, 2023
598f9b4
feat(ibmdotcom styles): remove react classes from table of contents
sangeethababu9223 Dec 13, 2023
f3ac4d8
Merge remote-tracking branch 'upstream/main' into feat/ibmdotcom-styl…
sangeethababu9223 Dec 13, 2023
6eda49b
feat(ibmdotcom styles): remove react classes from dotcom shell
sangeethababu9223 Dec 14, 2023
a4fab12
feat(ibmdotcom styles): remove react classes from footer
sangeethababu9223 Dec 15, 2023
76702e2
Merge branch 'main' into feat/ibmdotcom-styles-remove-react-class-2
sangeethababu9223 Dec 18, 2023
1197e24
feat(card): use link instead of button for pictogram card (#11225)
m4olivei Dec 18, 2023
0654cfd
feat(github-actions): restore workflow for publish masthead v2 alpha …
jkaeser Dec 18, 2023
dbff424
feat(ibmdotcom styles): resolve conflicts
sangeethababu9223 Dec 19, 2023
65c047e
Merge branch 'main' into feat/ibmdotcom-styles-remove-react-class-2
sangeethababu9223 Dec 21, 2023
fc5b059
fix(styles): resolve conflict
sangeethababu9223 Jan 8, 2024
529a1d0
Merge branch 'main' into feat/ibmdotcom-styles-remove-react-class-2
sangeethababu9223 Jan 9, 2024
8bc0699
Merge branch 'main' into feat/ibmdotcom-styles-remove-react-class-2
sangeethababu9223 Jan 10, 2024
1d17cd3
Merge branch 'main' into feat/ibmdotcom-styles-remove-react-class-2
sangeethababu9223 Jan 11, 2024
9d3dafe
Merge branch 'main' into feat/ibmdotcom-styles-remove-react-class-2
sangeethababu9223 Jan 16, 2024
dc9952c
fix(ibmdotcom styles): iccon position issue fix
sangeethababu9223 Jan 16, 2024
36e43ce
Merge branch 'main' into feat/ibmdotcom-styles-remove-react-class-2
sangeethababu9223 Jan 18, 2024
6dac1f3
Merge branch 'main' into feat/ibmdotcom-styles-remove-react-class-2
sangeethababu9223 Jan 19, 2024
f95eddd
Merge branch 'main' into feat/ibmdotcom-styles-remove-react-class-2
sangeethababu9223 Jan 23, 2024
0e501fc
Merge branch 'main' into feat/ibmdotcom-styles-remove-react-class-2
sangeethababu9223 Jan 24, 2024
36df41f
Merge branch 'main' into feat/ibmdotcom-styles-remove-react-class-2
sangeethababu9223 Jan 29, 2024
553758d
Merge branch 'main' into feat/ibmdotcom-styles-remove-react-class-2
sangeethababu9223 Feb 1, 2024
7d4b967
Merge branch 'main' into feat/ibmdotcom-styles-remove-react-class-2
sangeethababu9223 Feb 29, 2024
208084b
Merge branch 'main' into feat/ibmdotcom-styles-remove-react-class-2
sangeethababu9223 Mar 4, 2024
fdda805
Merge branch 'main' into feat/ibmdotcom-styles-remove-react-class-2
sangeethababu9223 Mar 28, 2024
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
51 changes: 3 additions & 48 deletions packages/styles/scss/components/card/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@
}

::slotted(#{$c4d-prefix}-image),
::slotted(#{$c4d-prefix}-card-cta-image),
.#{$prefix}--card__img,
.#{$prefix}--image {
::slotted(#{$c4d-prefix}-card-cta-image) {
z-index: -1;
}
}
Expand All @@ -65,8 +63,7 @@
z-index: 2;
text-decoration: none;

::slotted(#{$c4d-prefix}-image),
.#{$prefix}--image {
::slotted(#{$c4d-prefix}-image) {
z-index: -1;
}
}
Expand Down Expand Up @@ -133,13 +130,6 @@
inline-size: 100%;
}

.#{$prefix}--card__heading {
@include type-style('fluid-heading-03', true);

margin-block-end: $spacing-10;
}

.#{$prefix}--card__heading,
.#{$prefix}--card__copy {
@include content-width;

Expand All @@ -152,10 +142,6 @@
margin-block-end: $spacing-07;
}

.#{$prefix}--card__img {
transition: $duration-moderate-01 motion(standard, productive);
}

.#{$prefix}--card__link::after {
position: absolute;
content: '';
Expand Down Expand Up @@ -291,19 +277,6 @@
:host(#{$c4d-prefix}-card[aspect-ratio='16:9']) .#{$prefix}--card__wrapper {
@include ratio-base(16, 9, false);
}
.#{$prefix}--card.#{$prefix}--card--light {
background-color: $layer-02;
}

.#{$prefix}--card--border {
border: 1px solid $layer-accent-01;
}

// FIXME: CardLink is being used as Card in React, need to separate this
.#{$prefix}--card__CTA.#{$prefix}--card__CardCTA .#{$prefix}--card__heading {
@include type-style('fluid-heading-03', true);
}

// static card

:host(#{$c4d-prefix}-card),
Expand Down Expand Up @@ -415,8 +388,7 @@
outline: none;
}

:host(#{$c4d-prefix}-card-eyebrow),
.#{$prefix}--card__eyebrow {
:host(#{$c4d-prefix}-card-eyebrow) {
@include content-width;
@include type-style('label-02');

Expand Down Expand Up @@ -485,11 +457,6 @@
@include type-style('body-02');
}

.#{$prefix}--card__footer__copy {
margin-block-end: -$spacing-01;
max-inline-size: calc(100% - 20px);
}

svg,
::slotted(svg[slot='icon']) {
display: block;
Expand Down Expand Up @@ -572,15 +539,10 @@
background-color: $background-inverse-hover;
}

.#{$prefix}--card__heading,
.#{$prefix}--card__copy {
color: $icon-inverse;
}

.#{$prefix}--card__eyebrow {
color: $text-placeholder;
}

&:focus-within {
&::after {
position: absolute;
Expand Down Expand Up @@ -655,13 +617,6 @@
.#{$prefix}--card {
border: 1px solid $layer-accent-01;
background-color: $layer-02;

.#{$prefix}--card__img,
.#{$prefix}--card__image_img,
.#{$prefix}--image,
.#{$prefix}--card__video-thumbnail {
display: none;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,6 @@
}
}

.#{$prefix}--content-block-horizontal {
.#{$prefix}--content-block {
padding-block: $spacing-07 $spacing-05;

@include breakpoint(lg) {
padding-block: $spacing-10 $spacing-09;
}
}
}

:host(#{$c4d-prefix}-content-block-horizontal) ::slotted([slot='heading']),
.#{$prefix}--content-block-horizontal .#{$prefix}--content-block__heading {
margin-block-end: $spacing-07;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,13 @@
@use '../feature-card';

@mixin themed-items {
background: $background;
color: $text-primary;

&.#{$prefix}--content-block-media--with-border
.#{$prefix}--content-block-media__divider {
border-block-end-color: $toggle-off;
}
background: $background;
}

@mixin content-block-media {
.#{$prefix}--content-block-media,
:host(#{$c4d-prefix}-content-block-media) {
@include themed-items;

.#{$prefix}--content-group:last-child {
margin-block-end: 0;
}

.#{$prefix}--feature-card {
max-inline-size: to-rem(640px);
}
}

.#{$prefix}--content-block-media--g100 {
@include theme($g100, true);

@include themed-items;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,5 @@
max-inline-size: calc(100% + $spacing-05);
}
}

.#{$prefix}--layout-1-3 {
@include breakpoint-down(md) {
.#{$prefix}--link-list__list.#{$prefix}--link-list__list--card {
margin-inline-end: -$spacing-05;
}
}
@include breakpoint(lg) {
@include make-col-offset(1, 12);
}
}

.#{$prefix}--content-block__cta-col {
max-inline-size: carbon--mini-units(40);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,66 +22,10 @@
@include breakpoint(lg) {
padding-block-end: $spacing-13;
}

.#{$prefix}--content-block__cta-row {
margin-block-end: 0;
}

.#{$prefix}--layout-2-3 {
padding-inline-start: 0;
}
}
}

.#{$prefix}--content-group__cta-row {
@include breakpoint-down(md) {
margin-inline-start: 0;
}
}

.#{$prefix}--content-block__cta-row {
margin-block-end: $spacing-07;
@include breakpoint(lg) {
margin-block-end: $spacing-13;
}
}
}

// React specific classes to manage bottom spacing
.#{$prefix}--content-block-segmented {
&-border {
.#{$prefix}--content-block {
padding-block-end: 0;
}
}

.#{$prefix}--content-block__cta-row {
margin-block-end: 0;

&-border {
margin-block-end: $spacing-07;
@include breakpoint(lg) {
margin-block-end: $spacing-13;
}
}
}
}

:host(#{$c4d-prefix}-content-block-segmented)
.#{$prefix}--content-block__children
.#{$prefix}--content-block-segmented__media
::slotted(:not([slot])) {
display: block;
margin-block: $spacing-10;
}

:host(#{$c4d-prefix}-content-block-segmented)
.#{$prefix}--content-block__children
.#{$prefix}--content-block-segmented__media
::slotted(:not([slot]):last-of-type) {
margin-block-end: 0;
}

.#{$prefix}--content-block-segmented .#{$prefix}--content-group {
display: block;
margin-block: $spacing-10;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,4 @@
@use '../image';

@mixin content-block-simple {
.#{$prefix}--content-block-simple__media-video {
max-inline-size: to-rem(640px);
}

.#{$prefix}--content-block-simple__content {
.#{$prefix}--content-item {
&:first-of-type {
margin-block-start: 0;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@
}

@mixin content-group-cards {
:host(#{$c4d-prefix}-content-group-cards),
.#{$prefix}--content-group-cards {
::slotted([slot='copy']),
.#{$prefix}--content-group__copy {
:host(#{$c4d-prefix}-content-group-cards) {
::slotted([slot='copy']) {
margin-block-end: $spacing-09;

@include breakpoint(md) {
Expand All @@ -46,8 +44,7 @@
}
}

:host(#{$c4d-prefix}-content-group-cards-item),
.#{$prefix}--content-group-cards-item__col {
:host(#{$c4d-prefix}-content-group-cards-item) {
margin-block: list.slash($grid-gutter, 2);
padding-inline: list.slash($grid-gutter, 2);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,5 @@

div.#{$prefix}--content-group-pictograms {
padding-inline: 0;

.#{$prefix}--content-group__title {
padding-inline: $spacing-05;
}
}

.#{$prefix}--content-group-pictograms__item:last-child {
.#{$prefix}--content-item {
margin-block-end: 0;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,7 @@

@mixin content-group-simple {
:host(#{$c4d-prefix}-content-group-simple)
::slotted(#{$c4d-prefix}-content-group-copy),
.#{$prefix}--content-group-simple .#{$prefix}--content-group__copy {
::slotted(#{$c4d-prefix}-content-group-copy) {
margin-block-end: $spacing-07;
}

.bx--content-group__cta {
max-inline-size: calc(320px + $spacing-05);
padding-inline-end: 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,6 @@
}
}

.#{$prefix}--content-item-row__content-wrapper_with-media {
inline-size: 100%;
@include breakpoint(lg) {
@include make-col(8, 12);

padding-inline-start: $spacing-04;
}
}

:host(#{$c4d-prefix}-content-item-row) ::slotted([slot='media']) {
display: block;
padding-block-start: $spacing-07;
Expand Down Expand Up @@ -244,20 +235,6 @@
}
}

:host(#{$c4d-prefix}-content-item-row) .#{$prefix}--content-item__cta {
.#{$prefix}--link-list {
padding: 0;

&:first-of-type {
padding: 0;
}
}

.#{$prefix}--link-list li:last-of-type {
margin-block-end: 0;
}
}

:host(#{$c4d-prefix}-content-item-row) ::slotted([slot='thumbnail']) {
@include breakpoint(md) {
@include make-col(3, 3);
Expand Down
Loading
Loading