Skip to content

Commit

Permalink
fix: small css fixes + footer copy update (#269)
Browse files Browse the repository at this point in the history
* fix: remove redundant Typography component variant

* fix: remove vendor-prefixed css property

* refactor: use a CSS global variable for `transition-duration` value

* fix: change copy on Developers footer section
  • Loading branch information
DiogoSoaress authored Feb 8, 2024
1 parent d6555a1 commit 6e83e90
Show file tree
Hide file tree
Showing 21 changed files with 40 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@
.cta {
background: linear-gradient(260.13deg, #12ff80 1.24%, #5fddff 102.14%);
background-clip: text;
-webkit-background-clip: text;
color: transparent;
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@
text-align: center;
font-size: 88px;
line-height: 88px;
color: var(--mui-palette-primary-main);
background: linear-gradient(90deg, rgba(15, 255, 128, 1) 0%, rgba(94, 221, 255, 1) 60%);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
}

@media (min-width: 900px) {
Expand Down
1 change: 0 additions & 1 deletion src/components/Campaign/Tweets/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
margin-bottom: 40px;
background: linear-gradient(260.13deg, #12ff80 1.24%, #5fddff 102.14%);
background-clip: text;
-webkit-background-clip: text;
color: transparent;
}

Expand Down
4 changes: 2 additions & 2 deletions src/components/Careers/Cards/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
align-items: flex-start;
height: 100%;
position: relative;
transition: 0.3s;
transition: var(--transition-duration);
min-height: 272px;
}

Expand All @@ -29,7 +29,7 @@
position: absolute;
top: 24px;
right: 24px;
transition: transform 0.3s;
transition: transform var(--transition-duration);
}

/* Highlight */
Expand Down
6 changes: 3 additions & 3 deletions src/components/Core/LinkedCardGrid/styles.module.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.card {
border: 1px solid var(--mui-palette-border-light);
transition: 0.3s;
transition: var(--transition-duration);
}

.card:first-of-type {
Expand Down Expand Up @@ -52,11 +52,11 @@
position: absolute;
top: 32px;
right: 32px;
transition: transform 0.3s;
transition: transform var(--transition-duration);
}

.icon path {
transition: fill 0.3s;
transition: fill var(--transition-duration);
}

@media (min-width: 600px) {
Expand Down
9 changes: 3 additions & 6 deletions src/components/Ecosystem/Cards/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
align-items: flex-start;
height: 100%;
position: relative;
transition: border 0.3s;
transition: border var(--transition-duration);
}

.card:first-of-type {
Expand Down Expand Up @@ -42,11 +42,8 @@
color: var(--mui-palette-secondary-light);
}

.cardImage {
}

.cardLink:after {
content: "";
content: '';
position: absolute;
top: 0;
left: 0;
Expand All @@ -73,4 +70,4 @@
border-top-right-radius: 6px;
border-bottom-right-radius: 6px;
}
}
}
2 changes: 1 addition & 1 deletion src/components/Ecosystem/Projects/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
flex-direction: column;
align-items: flex-start;
position: relative;
transition: 0.3s;
transition: var(--transition-duration);
height: 300px;
}

Expand Down
10 changes: 3 additions & 7 deletions src/components/Governance/Delegates/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,11 @@ const DelegateCard = (props: Delegate) => (
{props.name}
</Typography>

<Typography variant="body1" color="primary.light">
{props.ens || shortenAddress(props.address)}
</Typography>
<Typography color="primary.light">{props.ens || shortenAddress(props.address)}</Typography>
</div>
</div>

<Typography variant="body1" className={css.description}>
{props.reason}
</Typography>
<Typography className={css.description}>{props.reason}</Typography>

<div className={css.socials}>
{props.twitter && (
Expand Down Expand Up @@ -75,7 +71,7 @@ const Delegates = (props: BaseBlock & { footer: { text: string; highlight: strin
</Grid>

<div className={css.footer}>
<Typography variant="body1" color="primary.light" textAlign="center">
<Typography color="primary.light" textAlign="center">
{props.footer.text}
<span>{props.footer.highlight}</span>
</Typography>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Governance/Delegates/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
flex-direction: column;
align-items: flex-start;
position: relative;
transition: 0.3s;
transition: var(--transition-duration);
height: 206px;
}

Expand Down
4 changes: 2 additions & 2 deletions src/components/Governance/OurMission/styles.module.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.gradientEmphasis b {
background: linear-gradient(90deg, #00c9ff 0%, #92fe9d 100%);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}

.card {
border: 1px solid var(--mui-palette-border-light);
transition: 0.3s;
transition: var(--transition-duration);
padding: 24px;
display: flex;
flex-direction: column;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Governance/Proposals/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
flex-direction: column;
gap: 8px;

transition: 0.3s;
transition: var(--transition-duration);
}

.proposalRow:hover {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Home/BigIconsCardGrid/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
text-align: center;
height: 100%;
position: relative;
transition: 0.3s;
transition: var(--transition-duration);
}

.card:hover {
Expand Down Expand Up @@ -48,7 +48,7 @@
position: absolute;
top: 32px;
right: 32px;
transition: transform 0.3s;
transition: transform var(--transition-duration);
}

@media (min-width: 600px) {
Expand Down
7 changes: 3 additions & 4 deletions src/components/Home/Stats/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}

.metric span {
transition: color 0.3s ease;
transition: color var(--transition-duration) ease;
}

.metric:hover span {
Expand All @@ -20,10 +20,9 @@
margin: 0;
font-size: 64px;
line-height: 64px;
color: var(--mui-palette-primary-main);
background: linear-gradient(90deg, rgba(15, 255, 128, 1) 0%, rgba(94, 221, 255, 1) 60%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
color: transparent;
}

@media (min-width: 600px) {
Expand Down
8 changes: 4 additions & 4 deletions src/components/Home/TitleTextLinkedCardGrid/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
border-radius: 16px;
outline: 1px solid var(--mui-palette-border-light);
height: 100%;
transition: 0.3s;
transition: var(--transition-duration);
margin: 2px;
}

Expand Down Expand Up @@ -37,11 +37,11 @@
position: absolute;
top: 32px;
right: 32px;
transition: transform 0.3s;
transition: transform var(--transition-duration);
}

.icon path {
transition: fill 0.3s;
transition: fill var(--transition-duration);
}

.gradient {
Expand All @@ -65,7 +65,7 @@
width: 100%;
height: 100%;
z-index: 0;
transition: 0.3s;
transition: var(--transition-duration);
}

@media (min-width: 600px) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Wallet/NetworkChip/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const NetworkChip = ({ name, icon, textColor, backgroundColor, isNew }: NetworkC
<div className={css.icon}>
<img {...icon} width={40} height={40} />
</div>
<Typography className={css.name} variant="body1" color={textColor}>
<Typography className={css.name} color={textColor}>
{name}
</Typography>
{isNew && <div className={css.newBadge}>New!</div>}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Wallet/Stepper/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const CustomStepper = ({ steps }: { steps: StepsType }) => (
<ul className={css.list}>
{description?.map((item, index) => (
<li className={css.listItem} key={index}>
<Typography key={index} variant="body1" color="primary.light" marginTop="18px" display="inline">
<Typography key={index} color="primary.light" marginTop="18px" display="inline">
{item}
</Typography>
</li>
Expand Down
4 changes: 2 additions & 2 deletions src/components/common/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const safeProtocolItems = [
rel: 'noreferrer',
},
{
label: 'Developer Docs',
label: 'Docs',
href: DOCS_LINK,
target: '_blank',
rel: 'noreferrer',
Expand Down Expand Up @@ -154,7 +154,7 @@ const Footer = () => {

<Grid item sm={6} md={2}>
<Typography variant="caption" color="text.primary">
Safe Core Protocol
Developers
</Typography>
<ul className={css.list}>
{safeProtocolItems.map((item) => (
Expand Down
4 changes: 1 addition & 3 deletions src/components/common/HeaderCTA/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ const HeaderCTA = (props: HeaderCTAProps) => {
<Typography variant="h2" mb={3} className={`${props.bigTitle ? css.bigTitle : null}`}>
{props.title}
</Typography>
<Typography variant="body1" color="primary.light">
{props.text}
</Typography>
<Typography color="primary.light">{props.text}</Typography>
</Grid>
{props.link && (
<Grid item xs={12} md={4} className={`${css.linkButton} ${!props.bigTitle && css.alignEnd}`}>
Expand Down
6 changes: 3 additions & 3 deletions src/components/common/LinkButton/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
line-height: 26px;
letter-spacing: 0.46px;
font-weight: 500;
transition: 0.3s;
transition: var(--transition-duration);
position: static;
}

Expand Down Expand Up @@ -43,7 +43,7 @@

.arrow {
margin-left: 4px;
transition: 0.3s;
transition: var(--transition-duration);
}

.arrow:after {
Expand All @@ -56,7 +56,7 @@
transform: translateX(-2px) translateY(-50%);
right: 0;
opacity: 0;
transition: 0.3s;
transition: var(--transition-duration);
}

.arrow svg {
Expand Down
4 changes: 1 addition & 3 deletions src/components/common/Networks/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ const Networks = ({ title, text, networks }: NetworksProps) => {
</div>
<div className={clsx(css.gradientBase, css.gradientFlipped)} />
</div>
<Typography className={css.secondaryText} variant="body1">
{text}
</Typography>
<Typography className={css.secondaryText}>{text}</Typography>
</div>
)
}
Expand Down
7 changes: 5 additions & 2 deletions src/styles/globals.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
:root {
--transition-duration: 0.3s;
}

@font-face {
font-family: 'Citerne';
font-display: swap;
Expand All @@ -20,7 +24,6 @@
src: url('/fonts/Citerne-Italic.woff2') format('woff2');
}


html,
body {
padding: 0;
Expand Down Expand Up @@ -72,7 +75,7 @@ u {

u:before,
u:after {
content: "{";
content: '{';
display: inline-block;
mask-repeat: no-repeat;
mask-position: bottom;
Expand Down

0 comments on commit 6e83e90

Please sign in to comment.