From ba2034d1b7dd84959f8fde269321d188e222ed8f Mon Sep 17 00:00:00 2001 From: emyarod Date: Wed, 15 Nov 2023 12:53:03 -0600 Subject: [PATCH] chore: lint --- .../components/card-group/_card-group.scss | 53 +++++++++---------- .../card-in-card/_card-in-card.scss | 3 +- .../video-player/_video-player.scss | 4 +- .../src/components/card-group/card-group.scss | 2 +- 4 files changed, 28 insertions(+), 34 deletions(-) diff --git a/packages/styles/scss/components/card-group/_card-group.scss b/packages/styles/scss/components/card-group/_card-group.scss index a387c913379..f6d26ae6b23 100644 --- a/packages/styles/scss/components/card-group/_card-group.scss +++ b/packages/styles/scss/components/card-group/_card-group.scss @@ -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. @@ -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]) { @@ -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 { @@ -72,7 +87,7 @@ } } - :host(#{$c4d-prefix}-card-group-item[href=""]) { + :host(#{$c4d-prefix}-card-group-item[href='']) { .#{$prefix}--card { outline: none; } @@ -83,7 +98,6 @@ } :host(#{$c4d-prefix}-card-group-item[link]) { - ::slotted(#{$c4d-prefix}-card-heading) { @include type-style('heading-02'); @@ -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'] { @@ -136,7 +131,7 @@ padding-top: $spacing-05; gap: $spacing-07; } - } + } :host(#{$c4d-prefix}-card-group)[grid-mode='condensed'] { @include breakpoint(sm) { @@ -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'] { diff --git a/packages/styles/scss/components/card-in-card/_card-in-card.scss b/packages/styles/scss/components/card-in-card/_card-in-card.scss index cc0dbbbf94a..486199b5aba 100644 --- a/packages/styles/scss/components/card-in-card/_card-in-card.scss +++ b/packages/styles/scss/components/card-in-card/_card-in-card.scss @@ -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. @@ -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)}); } diff --git a/packages/styles/scss/components/video-player/_video-player.scss b/packages/styles/scss/components/video-player/_video-player.scss index fe0c9d3c053..b1aa1166769 100644 --- a/packages/styles/scss/components/video-player/_video-player.scss +++ b/packages/styles/scss/components/video-player/_video-player.scss @@ -1,5 +1,5 @@ /** - * Copyright IBM Corp. 2016, 2021 + * 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. @@ -93,7 +93,7 @@ $aspect-ratios: ((16, 9), (9, 16), (2, 1), (1, 2), (4, 3), (3, 4), (1, 1)); width: 100%; position: relative; display: inline-block; - padding-top: Min(calc(100vh - #{$spacing-13}), 56.25%); + padding-top: min(calc(100vh - #{$spacing-13}), 56.25%); &:focus { outline: none; diff --git a/packages/web-components/src/components/card-group/card-group.scss b/packages/web-components/src/components/card-group/card-group.scss index ec83de3fc7f..4dd5f380cfe 100644 --- a/packages/web-components/src/components/card-group/card-group.scss +++ b/packages/web-components/src/components/card-group/card-group.scss @@ -7,4 +7,4 @@ * LICENSE file in the root directory of this source tree. */ -@use '@carbon/ibmdotcom-styles/scss/components/card-group' as *; \ No newline at end of file +@use '@carbon/ibmdotcom-styles/scss/components/card-group' as *;