Skip to content

Commit

Permalink
overriding styles for blog card items in the homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsingal committed Oct 11, 2023
1 parent 4bb4cf4 commit 85059b0
Show file tree
Hide file tree
Showing 5 changed files with 332 additions and 132 deletions.
2 changes: 1 addition & 1 deletion marketing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"react-use-scroll-direction": "^0.1.0",
"rooks": "5.10.0",
"sharp": "0.29.3",
"tailwindcss": "3.0.24",
"tailwindcss": "3.3.3",
"yup": "0.32.11"
},
"devDependencies": {
Expand Down
5 changes: 4 additions & 1 deletion marketing/src/components/blog-card/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ export interface BlogProps {

const BlogCard: FC<BlogProps> = ({ title, description, url, image }: BlogProps) => {
return (
<div className="bg-blue-900 h-96 w-96 border-1 border-solid border-blue-900">
<div
data-testid="blog-card-item"
className="bg-blue-900 h-96 w-96 border-1 border-solid border-blue-900"
>
<a href={url} target="_blank" rel="noreferrer noopener">
<div className="w-full overflow-hidden">
<img src={image} alt={title} className="w-full h-[178px] object-cover" />
Expand Down
13 changes: 13 additions & 0 deletions marketing/src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,16 @@
}
}
}

/* Overriding styles */
@layer components {
div[data-testid="blog-card-item"] p > em {
@apply not-italic;
}
div[data-testid="blog-card-item"] p > strong {
@apply font-bold text-white;
}
div[data-testid="blog-card-item"] p > a {
@apply underline text-white;
}
}
3 changes: 1 addition & 2 deletions marketing/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
const forms = require('@tailwindcss/forms');
const typography = require('@tailwindcss/typography');
const colors = require('tailwindcss/colors');
const lineClamp = require('@tailwindcss/line-clamp');
const defaultTheme = require('tailwindcss/defaultTheme');

module.exports = {
Expand Down Expand Up @@ -62,5 +61,5 @@ module.exports = {
},
},
},
plugins: [forms, typography, lineClamp],
plugins: [forms, typography],
};
Loading

0 comments on commit 85059b0

Please sign in to comment.