Skip to content

Commit

Permalink
media-object-refinement
Browse files Browse the repository at this point in the history
  • Loading branch information
sikhote committed Jan 2, 2025
1 parent 26973e5 commit 3e21dc3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/mediaObject/examples/MediaObject.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const examples: MediaObjectExample[] = [
props: {
background: 'brand-spruce',
gap: 'two-x',
contentPadding: 'none',
contentPadding: 'zero',
},
flags: ['color-inverse'],
},
Expand Down
14 changes: 7 additions & 7 deletions src/components/mediaObject/styles/vars/CdrMediaObject.vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

$media-object-component: 'media-object';

@mixin media() {
@mixin cdr-media-object-media-mixin() {
& > *:first-child {
@content;
}
}

@mixin content() {
@mixin cdr-media-object-content-mixin() {
& > *:last-child {
@content;
}
}

// Base mixin for media object
@mixin cdr-media-object-base-mixin($component) {
@include media {
@include cdr-media-object-media-mixin {
grid-area: media;

& > img,
Expand All @@ -26,7 +26,7 @@ $media-object-component: 'media-object';
}
}

@include content {
@include cdr-media-object-content-mixin {
grid-area: content;
container-type: inline-size;
width: 100%;
Expand All @@ -48,7 +48,7 @@ $media-object-component: 'media-object';

// Allow for media to cover entire container
@mixin cdr-media-object-cover-mixin($component) {
@include media {
@include cdr-media-object-media-mixin {
width: 100%;
height: 100%;
display: flex;
Expand All @@ -70,7 +70,7 @@ $media-object-component: 'media-object';
grid-template-areas: 'media';
position: relative;

@include content {
@include cdr-media-object-content-mixin {
position: absolute;
left: 0;
right: 0;
Expand All @@ -86,7 +86,7 @@ $media-object-component: 'media-object';
@mixin cdr-media-object-content-padding-mixin($component) {
@include cdr-cq-mixin($component, 'content-padding');

@include content {
@include cdr-media-object-content-mixin {
padding: var(--cdr-#{$component}-content-padding);
}
}
2 changes: 1 addition & 1 deletion src/types/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ export interface MediaObject extends Layout {
*/
mediaCover?: boolean;
/**
* Determines if content will overlay the media. A default media height is set, but it is suggested to apply your own using container width units (cqw) or pixels (px).
* Determines if content will overlay the media. A default media height is set, but it is suggested to apply your own using as value such as container width units (cqw) or rem.
*/
overlay?: boolean;
/**
Expand Down

0 comments on commit 3e21dc3

Please sign in to comment.