Remove hover and scroll transitions from website. (#19369)

This PR removes hover and scroll transitions from the website. 

Per the conversation with Thomas, we should introduce them one by one
for each section.
This commit is contained in:
Abdullah.
2026-04-07 12:58:40 +05:00
committed by GitHub
parent f33ad53e72
commit 2d552fc9fd
32 changed files with 544 additions and 993 deletions
@@ -1,10 +1,9 @@
import {
Heading as BaseHeading,
type HeadingProps,
} from "@/design-system/components/Heading/Heading";
import { theme } from "@/theme";
import { css } from "@linaria/core";
import { styled } from "@linaria/react";
} from '@/design-system/components/Heading/Heading';
import { theme } from '@/theme';
import { css } from '@linaria/core';
const problemHeadingClassName = css`
margin-top: calc(${theme.spacing(2)} - ${theme.spacing(10)});
@@ -14,29 +13,19 @@ const problemHeadingClassName = css`
}
`;
const HeadingWrapper = styled.div`
transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
&:hover {
transform: scale(1.02);
}
`;
export function Heading({
as = "h2",
size = "md",
weight = "light",
as = 'h2',
size = 'md',
weight = 'light',
...props
}: HeadingProps) {
return (
<HeadingWrapper>
<BaseHeading
className={problemHeadingClassName}
as={as}
size={size}
weight={weight}
{...props}
/>
</HeadingWrapper>
<BaseHeading
className={problemHeadingClassName}
as={as}
size={size}
weight={weight}
{...props}
/>
);
}
@@ -16,23 +16,6 @@ const StyledContainer = styled(Container)`
padding-right: ${theme.spacing(4)};
padding-top: ${theme.spacing(12)};
/* Smooth transition for the children elements */
& > * {
transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
/* When hovering one column, aggressively push the other one down and fade it out */
&:has(> div:hover) > div:not(:hover) {
opacity: 0.1;
transform: translateY(24px) scale(0.95);
}
/* Scale up the hovered column slightly */
&:has(> div:hover) > div:hover {
transform: scale(1.02);
z-index: 2;
}
@media (min-width: ${theme.breakpoints.md}px) {
column-gap: ${theme.spacing(4)};
grid-template-columns: 1fr 1fr;