Skip to content

Commit

Permalink
fix(card-pictogram): fixed mobile spacing (carbon-design-system#4856)
Browse files Browse the repository at this point in the history
### Related Ticket(s)

carbon-design-system#4807 

### Description

The card pictogram was missing 16px of padding on mobile breakpoint for web components


<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "package: styles": Carbon Expressive -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
  • Loading branch information
andysherman2121 authored and IgnacioBecerra committed Feb 22, 2021
1 parent abcdce6 commit 80de64d
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions packages/web-components/src/components/card/card.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright IBM Corp. 2020
// Copyright IBM Corp. 2020, 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 @@ -29,7 +29,6 @@
margin-bottom: 0;
}
}

:host(#{$dds-prefix}-card) {
.#{$prefix}--card__pictogram {
display: flex;
Expand All @@ -39,6 +38,20 @@
flex: 1;
display: flex;
align-items: flex-end;
@include carbon--breakpoint('md') {
padding-left: 0;
}
@include carbon--breakpoint('sm') {
padding-left: $carbon--spacing-05;
}
}
::slotted(#{$dds-prefix}-card-eyebrow) {
@include carbon--breakpoint('md') {
padding-left: 0;
}
@include carbon--breakpoint('sm') {
padding-left: $carbon--spacing-05;
}
}
}

Expand All @@ -50,12 +63,25 @@
}

.#{$prefix}--card__copy {
@include carbon--breakpoint('md') {
padding-left: 0;
}
@include carbon--breakpoint('sm') {
padding-left: $carbon--spacing-05;
}

display: none;
}
}

::slotted(svg[slot='pictogram']) {
color: $icon-01;
@include carbon--breakpoint('md') {
margin-left: 0;
}
@include carbon--breakpoint('sm') {
margin-left: $carbon--layout-01;
}
}

&[color-scheme='inverse'] ::slotted(svg[slot='pictogram']) {
Expand Down

0 comments on commit 80de64d

Please sign in to comment.