Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
emyarod committed Nov 16, 2023
1 parent 8a04c76 commit ba2034d
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 34 deletions.
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
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* LICENSE file in the root directory of this source tree.
*/

@use '@carbon/ibmdotcom-styles/scss/components/card-group' as *;
@use '@carbon/ibmdotcom-styles/scss/components/card-group' as *;

0 comments on commit ba2034d

Please sign in to comment.