-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(content-block-cards): fix margin in smallest breakpoint (#5014)
### Related Ticket(s) Refs #4959. ### Description Fixes wrong margin in `<dds-content-block-cards>` in its smallest breakpoint. Also migrates the internal layout to CSS grid to eliminate the negative margin adjustment of heading vs. cards. ### Changelog **Changed** - Change to fix wrong margin in `<dds-content-block-cards>` in its smallest breakpoint. - Change to migrate the internal layout to CSS grid.
- Loading branch information
Showing
7 changed files
with
97 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 1 addition & 11 deletions
12
packages/web-components/src/components/content-block-cards/content-block-cards.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,8 @@ | ||
// | ||
// 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. | ||
// | ||
|
||
@import '@carbon/ibmdotcom-styles/scss/components/content-block-cards/content-block-cards'; | ||
|
||
:host(#{$dds-prefix}-content-block-cards) { | ||
padding-left: calc(#{$carbon--grid-gutter} / 2); | ||
padding-right: calc(#{$carbon--grid-gutter} / 2); | ||
|
||
.#{$prefix}--content-block__children { | ||
margin-left: calc(-1 * #{$carbon--grid-gutter} / 2); | ||
margin-right: calc(-1 * #{$carbon--grid-gutter} / 2); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters