Prevent text jumping because of font-weight change on active tabs item
[MAILPOET-2776]
This commit is contained in:
@@ -64,7 +64,7 @@
|
|||||||
|
|
||||||
// Hack so the text is not jumping when changed to bold when active
|
// Hack so the text is not jumping when changed to bold when active
|
||||||
&:before {
|
&:before {
|
||||||
content: attr(title);
|
content: attr(data-title);
|
||||||
display: block;
|
display: block;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
height: 0;
|
height: 0;
|
||||||
|
@@ -58,6 +58,7 @@
|
|||||||
background: $color-white;
|
background: $color-white;
|
||||||
border-color: $color-tertiary-light;
|
border-color: $color-tertiary-light;
|
||||||
color: $color-secondary;
|
color: $color-secondary;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
@@ -78,6 +79,16 @@
|
|||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Hack so the text is not jumping when changed to bold when active
|
||||||
|
> span:before {
|
||||||
|
content: attr(data-title);
|
||||||
|
display: block;
|
||||||
|
font-weight: bold;
|
||||||
|
height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mailpoet-tabs-title {
|
.mailpoet-tabs-title {
|
||||||
|
@@ -19,7 +19,7 @@ const Steps = ({ count, current, titles }: Props) => (
|
|||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<div className="mailpoet-step-badge">{i >= current ? i : ''}</div>
|
<div className="mailpoet-step-badge">{i >= current ? i : ''}</div>
|
||||||
{titles[i - 1] && <div className="mailpoet-step-title" title={titles[i - 1] || ''}>{titles[i - 1] || ''}</div>}
|
{titles[i - 1] && <div className="mailpoet-step-title" data-title={titles[i - 1] || ''}>{titles[i - 1] || ''}</div>}
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
@@ -73,7 +73,7 @@ const Tabs = ({
|
|||||||
const title = (props) => (
|
const title = (props) => (
|
||||||
<>
|
<>
|
||||||
{props.iconStart}
|
{props.iconStart}
|
||||||
{props.title && <span>{props.title}</span>}
|
{props.title && <span data-title={props.title}>{props.title}</span>}
|
||||||
{props.iconEnd}
|
{props.iconEnd}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user