fix(ui): minor issues with tabs and publish buttons when in RTL (#11282)
Fixes https://github.com/payloadcms/payload/issues/11162 Our tabs had wrong spacing in RTL. The publish button with its dropdown had its borders and border radiuses on the wrong side for RTL and fixed a minor issue in website template around RTL margins. Now publish button looks as expected in RTL: 
This commit is contained in:
@@ -68,11 +68,20 @@
|
|||||||
background-color: var(--bg-color);
|
background-color: var(--bg-color);
|
||||||
box-shadow: var(--box-shadow);
|
box-shadow: var(--box-shadow);
|
||||||
border-radius: $style-radius-m;
|
border-radius: $style-radius-m;
|
||||||
border-left: 1px solid var(--theme-bg);
|
|
||||||
border-top-left-radius: 0;
|
|
||||||
border-bottom-left-radius: 0;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
|
html:not([dir='RTL']) & {
|
||||||
|
border-left: 1px solid var(--theme-bg);
|
||||||
|
border-top-left-radius: 0;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[dir='RTL'] & {
|
||||||
|
border-right: 1px solid var(--theme-bg);
|
||||||
|
border-top-right-radius: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus-visible,
|
&:focus-visible,
|
||||||
&:focus,
|
&:focus,
|
||||||
@@ -236,8 +245,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&--withPopup .btn {
|
&--withPopup .btn {
|
||||||
border-top-right-radius: 0;
|
html:not([dir='RTL']) & {
|
||||||
border-bottom-right-radius: 0;
|
border-top-right-radius: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[dir='RTL'] & {
|
||||||
|
border-top-left-radius: 0;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&--style-icon-label,
|
&--style-icon-label,
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
@extend %h4;
|
@extend %h4;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding-bottom: base(1);
|
padding-bottom: base(1);
|
||||||
margin: 0 $baseline 0 0;
|
margin: 0;
|
||||||
|
margin-inline-end: $baseline;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export const ArchiveBlock: React.FC<
|
|||||||
<div className="my-16" id={`block-${id}`}>
|
<div className="my-16" id={`block-${id}`}>
|
||||||
{introContent && (
|
{introContent && (
|
||||||
<div className="container mb-16">
|
<div className="container mb-16">
|
||||||
<RichText className="ml-0 max-w-[48rem]" data={introContent} enableGutter={false} />
|
<RichText className="ms-0 max-w-[48rem]" data={introContent} enableGutter={false} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<CollectionArchive posts={posts} />
|
<CollectionArchive posts={posts} />
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export const ArchiveBlock: React.FC<
|
|||||||
<div className="my-16" id={`block-${id}`}>
|
<div className="my-16" id={`block-${id}`}>
|
||||||
{introContent && (
|
{introContent && (
|
||||||
<div className="container mb-16">
|
<div className="container mb-16">
|
||||||
<RichText className="ml-0 max-w-[48rem]" data={introContent} enableGutter={false} />
|
<RichText className="ms-0 max-w-[48rem]" data={introContent} enableGutter={false} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<CollectionArchive posts={posts} />
|
<CollectionArchive posts={posts} />
|
||||||
|
|||||||
Reference in New Issue
Block a user