Skip to content

Commit

Permalink
Move global shadows scss to module scss (#50167)
Browse files Browse the repository at this point in the history
  • Loading branch information
heiskr authored Apr 16, 2024
1 parent 840606c commit d945c30
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/frame/stylesheets/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

@import "headings.scss";
@import "scroll-top.scss";
@import "shadows.scss";
@import "utilities.scss";

@import "src/content-render/stylesheets/index.scss";
Expand Down
9 changes: 8 additions & 1 deletion src/landings/components/GuideCard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import type { FeaturedLink } from 'src/landings/components/ProductLandingContext'
import cx from 'classnames'
import styles from './Landings.module.scss'

const { hoverShadowLarge } = styles

type Props = {
guide: FeaturedLink
Expand All @@ -10,7 +14,10 @@ export const GuideCard = ({ guide }: Props) => {
return (
<li className="col-lg-4 col-12 mb-4 list-style-none">
<a
className="Box color-shadow-medium height-full d-block hover-shadow-large no-underline color-fg-default p-5"
className={cx(
'Box color-shadow-medium height-full d-block no-underline color-fg-default p-5',
hoverShadowLarge,
)}
href={guide.href}
>
<h3 className="f2">{guide.title}</h3>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.hover-shadow-large {
.hoverShadowLarge {
transition: box-shadow 0.3s ease-in-out;

&:hover {
Expand Down
9 changes: 8 additions & 1 deletion src/landings/components/RepoCard.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import cx from 'classnames'
import styles from './Landings.module.scss'
const { hoverShadowLarge } = styles

type Props = {
repo: {
repo: string
Expand All @@ -8,7 +12,10 @@ type Props = {
export const RepoCard = ({ repo, href }: Props) => {
return (
<a
className="Box d-flex height-full color-shadow-medium hover-shadow-large no-underline color-fg-default p-4"
className={cx(
'Box d-flex height-full color-shadow-medium no-underline color-fg-default p-4',
hoverShadowLarge,
)}
href={href || `https://github.com/${repo.repo}`}
>
<div className="flex-shrink-0 mr-3">
Expand Down
9 changes: 8 additions & 1 deletion src/landings/components/UserCard.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import cx from 'classnames'
import styles from './Landings.module.scss'
const { hoverShadowLarge } = styles

type Props = {
user: {
username: string
Expand All @@ -8,7 +12,10 @@ type Props = {
export const UserCard = ({ user, href }: Props) => {
return (
<a
className="Box d-flex height-full color-shadow-medium hover-shadow-large no-underline color-fg-default p-4"
className={cx(
'Box d-flex height-full color-shadow-medium no-underline color-fg-default p-4',
hoverShadowLarge,
)}
href={href || `https://github.com/${user.username}`}
>
<div className="flex-shrink-0 mr-3">
Expand Down

0 comments on commit d945c30

Please sign in to comment.