Skip to content

Commit

Permalink
[Themes 1688] regression error fix (#2151)
Browse files Browse the repository at this point in the history
* reverted medium-container grid styles
---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Malavika Koppula <[email protected]>
Co-authored-by: Anna Sherman <[email protected]>
Co-authored-by: LauraPinilla <[email protected]>
Co-authored-by: blakeganderson <[email protected]>
  • Loading branch information
6 people authored May 30, 2024
1 parent 45bbb13 commit 4f6cc5f
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 50 deletions.
11 changes: 6 additions & 5 deletions .storybook/themes/news.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3974,8 +3974,7 @@
"font-size": var(--heading-level-5-font-size),
"font-weight": var(--heading-level-5-font-weight),
"line-height": var(--heading-level-5-line-height),
"margin-block-end": var(--global-spacing-4),
"inline-size": 66%
"margin-block-end": var(--global-spacing-4)
),
"link": (
"position": relative,
Expand All @@ -3986,7 +3985,7 @@
"margin-block-start": 0,
"margin-inline-end": 0,
"margin-inline-start": 0,
"max-inline-size": 100px
"max-inline-size": 34%
),
"paragraph": (
"display": block
Expand All @@ -4001,7 +4000,7 @@
),
"top-table-list-medium-container": (
"gap": var(--global-spacing-8),
"grid-template-columns": 1fr,
"grid-template-columns": "1fr",
"grid-template-rows": auto
),
"top-table-list-medium-icon-label": (
Expand Down Expand Up @@ -4034,9 +4033,10 @@
"margin-inline-start": var(--global-spacing-2)
),
"top-table-list-medium-show-image": (
"grid-template-columns": 66% auto,
"components": (
"heading": (
"inline-size": 68%
"inline-size": 66%
)
)
),
Expand Down Expand Up @@ -5184,6 +5184,7 @@
"display": inline
),
"top-table-list-medium-show-image": (
"grid-template-columns": "auto 66%",
"components": (
"attribution": (
"margin-inline-start": calc(33% + var(--global-spacing-6))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,49 +96,51 @@ const Medium = (props) => {
<article
className={`${BLOCK_CLASS_NAME}${showImageMD ? ` ${BLOCK_CLASS_NAME}--show-image` : ""}`}
>
{showImageMD ? (
<MediaItem>
<Conditional
component={Link}
condition={contentUrl}
href={formatURL(contentUrl)}
assistiveHidden
>
<Image {...imageParams} />
{labelIconName ? (
<div className={`${BLOCK_CLASS_NAME}__icon_label`}>
<Icon name={labelIconName} />
<span className={`${BLOCK_CLASS_NAME}__label`}>{labelIconText}</span>
</div>
) : null}
</Conditional>
</MediaItem>
) : null}
<div>
{showImageMD ? (
<MediaItem>
<Conditional
component={Link}
condition={contentUrl}
href={formatURL(contentUrl)}
assistiveHidden
>
<Image {...imageParams} />
{labelIconName ? (
<div className={`${BLOCK_CLASS_NAME}__icon_label`}>
<Icon name={labelIconName} />
<span className={`${BLOCK_CLASS_NAME}__label`}>{labelIconText}</span>
</div>
) : null}
</Conditional>
</MediaItem>
) : null}

{contentHeading ? (
<Heading>
<Conditional component={Link} condition={contentUrl} href={formatURL(contentUrl)}>
{contentHeading}
</Conditional>
</Heading>
) : null}
{contentHeading ? (
<Heading>
<Conditional component={Link} condition={contentUrl} href={formatURL(contentUrl)}>
{contentHeading}
</Conditional>
</Heading>
) : null}

{contentDescription ? <Paragraph>{contentDescription}</Paragraph> : null}
{hasAuthors || showDateMD ? (
<Attribution>
<Join separator={Separator}>
{hasAuthors ? (
<Join separator={() => " "}>
{phrases.t("global.by-text")}
{formatAuthors(element?.credits?.by, phrases.t("global.and-text"))}
</Join>
) : null}
{showDateMD ? (
<DateComponent dateTime={contentDate} dateString={formattedDate} />
) : null}
</Join>
</Attribution>
) : null}
{contentDescription ? <Paragraph>{contentDescription}</Paragraph> : null}
{hasAuthors || showDateMD ? (
<Attribution>
<Join separator={Separator}>
{hasAuthors ? (
<Join separator={() => " "}>
{phrases.t("global.by-text")}
{formatAuthors(element?.credits?.by, phrases.t("global.and-text"))}
</Join>
) : null}
{showDateMD ? (
<DateComponent dateTime={contentDate} dateString={formattedDate} />
) : null}
</Join>
</Attribution>
) : null}
</div>
{showBottomBorder ? <Divider /> : null}
</article>
</HeadingSection>
Expand Down
9 changes: 5 additions & 4 deletions blocks/top-table-list-block/themes/news.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,13 @@
"margin-block-start": "0",
"margin-inline-end": "0",
"margin-inline-start": "0",
"max-inline-size": "100px"
"max-inline-size": "34%"
},
"heading": {
"font-size": "var(--heading-level-5-font-size)",
"font-weight": "var(--heading-level-5-font-weight)",
"line-height": "var(--heading-level-5-line-height)",
"margin-block-end": "var(--global-spacing-4)",
"inline-size": "66%"
"margin-block-end": "var(--global-spacing-4)"
},
"link": {
"position": "relative"
Expand Down Expand Up @@ -247,13 +246,15 @@
"top-table-list-medium-show-image": {
"styles": {
"default": {
"grid-template-columns": "66% auto",
"components": {
"heading": {
"inline-size": "68%"
"inline-size": "66%"
}
}
},
"desktop": {
"grid-template-columns": "auto 66%",
"components": {
"attribution": {
"margin-inline-start": "calc(33% + var(--global-spacing-6))"
Expand Down

0 comments on commit 4f6cc5f

Please sign in to comment.