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

fix(styles): card updates #4933

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
12 changes: 10 additions & 2 deletions packages/styles/src/card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,15 @@ $fd-card-header-outline-offset: 0.0625rem !default;
word-wrap: break-word;
max-height: 2.5rem;
max-width: 100%;
line-height: 1rem;
}

&__counter.#{$object-status} {
font-size: var(--sapFontSmallSize);
text-align: right;
margin: var(--fdCard_Counter_Margin);
white-space: nowrap;
color: var(--sapNeutralTextColor);

@include fd-rtl() {
margin: var(--fdCard_Counter_Margin_RTL);
Expand Down Expand Up @@ -388,6 +390,10 @@ $fd-card-header-outline-offset: 0.0625rem !default;
@include fd-reset();

padding-bottom: 0.5rem;

h3 {
font-size: var(--sapFontSize);
}
mikerodonnell89 marked this conversation as resolved.
Show resolved Hide resolved
}

&__content-group {
Expand All @@ -411,8 +417,6 @@ $fd-card-header-outline-offset: 0.0625rem !default;
}

& > * {
margin-bottom: 0.25rem;

&:last-child {
margin-bottom: 0;
}
Expand Down Expand Up @@ -441,6 +445,10 @@ $fd-card-header-outline-offset: 0.0625rem !default;
}

&--table {
.#{$block}__header {
padding-bottom: 0.5rem;
}

@include fd-compact-or-condensed() {
.#{$block}__content {
padding-bottom: 0.5rem;
Expand Down
2 changes: 1 addition & 1 deletion packages/styles/stories/Components/card/card.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,4 @@ Component (class) | Description
`
}
}
};
};
38 changes: 19 additions & 19 deletions packages/styles/stories/Components/card/object-card.example.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,38 +19,38 @@
<div class="fd-card__content" role="group" aria-label="Card Content">
<div class="fd-card__content-container">
<div class="fd-card__content-section">
<div class="fd-card__content-title-container">Group Title 1</div>
<div class="fd-card__content-title-container"><h3>Group Title 1</h3></div>
mikerodonnell89 marked this conversation as resolved.
Show resolved Hide resolved
<div class="fd-card__content-group">
<div class="fd-card__content-group-text">
<span>Label</span>
<span>Text</span>
<span>Label:</span>
<span class="fd-link">Text</span>
mikerodonnell89 marked this conversation as resolved.
Show resolved Hide resolved
</div>
</div>
<div class="fd-card__content-group">
<div class="fd-card__content-group-text">
<span>Label</span>
<span>Text</span>
<span>Label:</span>
<span class="fd-link">Text</span>
</div>
</div>
<div class="fd-card__content-group">
<div class="fd-card__content-group-text">
<span>Label</span>
<span>Text</span>
<span>Label:</span>
<span class="fd-link">Text</span>
</div>
</div>
</div>
<div class="fd-card__content-section">
<div class="fd-card__content-title-container">Group Title 2</div>
<div class="fd-card__content-group">
<div class="fd-card__content-group-text">
<span>Label</span>
<span>Text</span>
<span>Label:</span>
<span class="fd-link">Text</span>
</div>
</div>
<div class="fd-card__content-group">
<div class="fd-card__content-group-text">
<span>Label</span>
<span>Text</span>
<span>Label:</span>
<span class="fd-link">Text</span>
</div>
</div>
<div class="fd-card__content-group">
Expand Down Expand Up @@ -97,14 +97,14 @@ <h3 style="margin: 0;">Group Title 1</h3>
</div>
<div class="fd-card__content-group">
<div class="fd-card__content-group-text">
<span>Label</span>
<span>Text</span>
<span>Label:</span>
<span class="fd-link">Text</span>
</div>
</div>
<div class="fd-card__content-group">
<div class="fd-card__content-group-text">
<span>Label</span>
<span>Text</span>
<span>Label:</span>
<span class="fd-link">Text</span>
</div>
</div>
</div>
Expand All @@ -122,14 +122,14 @@ <h3 style="margin: 0;">Group Title 2</h3>
</div>
<div class="fd-card__content-group">
<div class="fd-card__content-group-text">
<span>Label</span>
<span>Text</span>
<span>Label:</span>
<span class="fd-link">Text</span>
</div>
</div>
<div class="fd-card__content-group">
<div class="fd-card__content-group-text">
<span>Label</span>
<span>Text</span>
<span>Label:</span>
<span class="fd-link">Text</span>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<tr class="fd-table__row">
<th class="fd-table__cell fd-table__cell--checkbox">
<input aria-label="checkbox" type="checkbox" class="fd-checkbox" id="kqqzPI">
<label class="fd-checkbox__label" for="kqqzPI"></label>
<label class="fd-checkbox__label" for="kqqzPI"><span class="fd-checkbox__checkmark" aria-hidden="true"></span></label>
</th>
<th class="fd-table__cell" scope="col">Name</th>
<th class="fd-table__cell" scope="col">Status</th>
Expand All @@ -28,7 +28,7 @@
<tr class="fd-table__row">
<td class="fd-table__cell fd-table__cell--checkbox">
<input aria-label="checkbox" type="checkbox" class="fd-checkbox" id="EWuzWh">
<label class="fd-checkbox__label" for="EWuzWh"></label>
<label class="fd-checkbox__label" for="EWuzWh"><span class="fd-checkbox__checkmark" aria-hidden="true"></span></label>
</td>
<td class="fd-table__cell">Banana</td>
<td class="fd-table__cell">
Expand All @@ -45,7 +45,7 @@
<tr class="fd-table__row">
<td class="fd-table__cell fd-table__cell--checkbox">
<input aria-label="checkbox" type="checkbox" class="fd-checkbox" id="19j0Sc">
<label class="fd-checkbox__label" for="19j0Sc"></label>
<label class="fd-checkbox__label" for="19j0Sc"><span class="fd-checkbox__checkmark" aria-hidden="true"></span></label>
</td>
<td class="fd-table__cell">Pineapple</td>
<td class="fd-table__cell">
Expand All @@ -62,7 +62,7 @@
<tr class="fd-table__row">
<td class="fd-table__cell fd-table__cell--checkbox">
<input aria-label="checkbox" type="checkbox" class="fd-checkbox" id="a7SfGX">
<label class="fd-checkbox__label" for="a7SfGX"></label>
<label class="fd-checkbox__label" for="a7SfGX"><span class="fd-checkbox__checkmark" aria-hidden="true"></span></label>
</td>
<td class="fd-table__cell">Orange</td>
<td class="fd-table__cell">
Expand Down
46 changes: 23 additions & 23 deletions packages/styles/tests/__snapshots__/styles.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11231,38 +11231,38 @@ exports[`Check stories > Components/Card > Story ObjectCard > Should match snaps
<div class=\\"fd-card__content\\" role=\\"group\\" aria-label=\\"Card Content\\">
<div class=\\"fd-card__content-container\\">
<div class=\\"fd-card__content-section\\">
<div class=\\"fd-card__content-title-container\\">Group Title 1</div>
<div class=\\"fd-card__content-title-container\\"><h3>Group Title 1</h3></div>
<div class=\\"fd-card__content-group\\">
<div class=\\"fd-card__content-group-text\\">
<span>Label</span>
<span>Text</span>
<span>Label:</span>
<span class=\\"fd-link\\">Text</span>
</div>
</div>
<div class=\\"fd-card__content-group\\">
<div class=\\"fd-card__content-group-text\\">
<span>Label</span>
<span>Text</span>
<span>Label:</span>
<span class=\\"fd-link\\">Text</span>
</div>
</div>
<div class=\\"fd-card__content-group\\">
<div class=\\"fd-card__content-group-text\\">
<span>Label</span>
<span>Text</span>
<span>Label:</span>
<span class=\\"fd-link\\">Text</span>
</div>
</div>
</div>
<div class=\\"fd-card__content-section\\">
<div class=\\"fd-card__content-title-container\\">Group Title 2</div>
<div class=\\"fd-card__content-group\\">
<div class=\\"fd-card__content-group-text\\">
<span>Label</span>
<span>Text</span>
<span>Label:</span>
<span class=\\"fd-link\\">Text</span>
</div>
</div>
<div class=\\"fd-card__content-group\\">
<div class=\\"fd-card__content-group-text\\">
<span>Label</span>
<span>Text</span>
<span>Label:</span>
<span class=\\"fd-link\\">Text</span>
</div>
</div>
<div class=\\"fd-card__content-group\\">
Expand Down Expand Up @@ -11309,14 +11309,14 @@ exports[`Check stories > Components/Card > Story ObjectCard > Should match snaps
</div>
<div class=\\"fd-card__content-group\\">
<div class=\\"fd-card__content-group-text\\">
<span>Label</span>
<span>Text</span>
<span>Label:</span>
<span class=\\"fd-link\\">Text</span>
</div>
</div>
<div class=\\"fd-card__content-group\\">
<div class=\\"fd-card__content-group-text\\">
<span>Label</span>
<span>Text</span>
<span>Label:</span>
<span class=\\"fd-link\\">Text</span>
</div>
</div>
</div>
Expand All @@ -11334,14 +11334,14 @@ exports[`Check stories > Components/Card > Story ObjectCard > Should match snaps
</div>
<div class=\\"fd-card__content-group\\">
<div class=\\"fd-card__content-group-text\\">
<span>Label</span>
<span>Text</span>
<span>Label:</span>
<span class=\\"fd-link\\">Text</span>
</div>
</div>
<div class=\\"fd-card__content-group\\">
<div class=\\"fd-card__content-group-text\\">
<span>Label</span>
<span>Text</span>
<span>Label:</span>
<span class=\\"fd-link\\">Text</span>
</div>
</div>
</div>
Expand Down Expand Up @@ -11371,7 +11371,7 @@ exports[`Check stories > Components/Card > Story TableCard > Should match snapsh
<tr class=\\"fd-table__row\\">
<th class=\\"fd-table__cell fd-table__cell--checkbox\\">
<input aria-label=\\"checkbox\\" type=\\"checkbox\\" class=\\"fd-checkbox\\" id=\\"kqqzPI\\">
<label class=\\"fd-checkbox__label\\" for=\\"kqqzPI\\"></label>
<label class=\\"fd-checkbox__label\\" for=\\"kqqzPI\\"><span class=\\"fd-checkbox__checkmark\\" aria-hidden=\\"true\\"></span></label>
</th>
<th class=\\"fd-table__cell\\" scope=\\"col\\">Name</th>
<th class=\\"fd-table__cell\\" scope=\\"col\\">Status</th>
Expand All @@ -11384,7 +11384,7 @@ exports[`Check stories > Components/Card > Story TableCard > Should match snapsh
<tr class=\\"fd-table__row\\">
<td class=\\"fd-table__cell fd-table__cell--checkbox\\">
<input aria-label=\\"checkbox\\" type=\\"checkbox\\" class=\\"fd-checkbox\\" id=\\"EWuzWh\\">
<label class=\\"fd-checkbox__label\\" for=\\"EWuzWh\\"></label>
<label class=\\"fd-checkbox__label\\" for=\\"EWuzWh\\"><span class=\\"fd-checkbox__checkmark\\" aria-hidden=\\"true\\"></span></label>
</td>
<td class=\\"fd-table__cell\\">Banana</td>
<td class=\\"fd-table__cell\\">
Expand All @@ -11401,7 +11401,7 @@ exports[`Check stories > Components/Card > Story TableCard > Should match snapsh
<tr class=\\"fd-table__row\\">
<td class=\\"fd-table__cell fd-table__cell--checkbox\\">
<input aria-label=\\"checkbox\\" type=\\"checkbox\\" class=\\"fd-checkbox\\" id=\\"19j0Sc\\">
<label class=\\"fd-checkbox__label\\" for=\\"19j0Sc\\"></label>
<label class=\\"fd-checkbox__label\\" for=\\"19j0Sc\\"><span class=\\"fd-checkbox__checkmark\\" aria-hidden=\\"true\\"></span></label>
</td>
<td class=\\"fd-table__cell\\">Pineapple</td>
<td class=\\"fd-table__cell\\">
Expand All @@ -11418,7 +11418,7 @@ exports[`Check stories > Components/Card > Story TableCard > Should match snapsh
<tr class=\\"fd-table__row\\">
<td class=\\"fd-table__cell fd-table__cell--checkbox\\">
<input aria-label=\\"checkbox\\" type=\\"checkbox\\" class=\\"fd-checkbox\\" id=\\"a7SfGX\\">
<label class=\\"fd-checkbox__label\\" for=\\"a7SfGX\\"></label>
<label class=\\"fd-checkbox__label\\" for=\\"a7SfGX\\"><span class=\\"fd-checkbox__checkmark\\" aria-hidden=\\"true\\"></span></label>
</td>
<td class=\\"fd-table__cell\\">Orange</td>
<td class=\\"fd-table__cell\\">
Expand Down
Loading