Skip to content

Commit a4678e3

Browse files
committed
fix: enhance Card component styling
1 parent 43b7dcc commit a4678e3

File tree

9 files changed

+24
-42
lines changed

9 files changed

+24
-42
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
version = "0.2.9"
2+
version = "0.2.10"
33
name = "rustlanges-components"
44
description = "RustLangES components library"
55
edition = "2024"
@@ -13,7 +13,7 @@ leptos = ["leptos-components"]
1313

1414
[workspace]
1515
members = [ "crates/core", "crates/leptos" ]
16-
package = { version = "0.2.9" }
16+
package = { version = "0.2.10" }
1717

1818
[workspace.dependencies]
1919
components-core = { package = "rustlanges-components-core", version = "0.2", path = "./crates/core" }

crates/leptos/src/card.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ pub fn Card(
2828

2929
return view! {
3030
<div class={class}>
31-
<svg viewBox="0 0 334 444" fill="none" xmlns="http://www.w3.org/2000/svg" class="drop-shadow-resource-card">
32-
<path d="M267.221 2C275.589 2 283.519 5.74306 288.838 12.2038L325.617 56.8794C329.744 61.892 332 68.1829 332 74.6756V414C332 429.464 319.464 442 304 442H30C14.536 442 2 429.464 2 414V30C2 14.536 14.536 2 30 2H267.221Z" fill="#3D3D3D" stroke="black" stroke-width="2"/>
31+
<svg viewBox="0 0 334 444" fill="none" xmlns="http://www.w3.org/2000/svg" class="text-primary-50 dark:text-neutral-900">
32+
<path d="M267.221 2C275.589 2 283.519 5.74306 288.838 12.2038L325.617 56.8794C329.744 61.892 332 68.1829 332 74.6756V414C332 429.464 319.464 442 304 442H30C14.536 442 2 429.464 2 414V30C2 14.536 14.536 2 30 2H267.221Z" fill="currentColor" stroke-width="2"/>
3333
</svg>
3434
<div class="rustlanges-card--resource-body">
3535
{children()}

js/react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@rustlanges/react",
33
"private": false,
4-
"version": "0.0.9",
4+
"version": "0.0.10",
55
"type": "module",
66
"exports": {
77
".": {

js/showcase/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@rustlanges/showcase",
33
"private": true,
4-
"version": "0.0.9",
4+
"version": "0.0.10",
55
"type": "module",
66
"exports": {
77
".": {

js/vue/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@rustlanges/vue",
33
"private": false,
4-
"version": "0.0.9",
4+
"version": "0.0.10",
55
"type": "module",
66
"exports": {
77
".": {

styles/components/card.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,14 @@
2222
}
2323

2424
.rustlanges-card--resource > svg {
25-
filter: drop-shadow(0px 0px 0px #000000) drop-shadow(4px 4px 0px #000000)
26-
url(#inset-shadow);
27-
@apply h-auto w-full;
25+
filter: drop-shadow(0px 0px 0px #000000) drop-shadow(4px 4px 0px #000000);
26+
@apply h-auto w-full stroke-[#000000];
27+
}
28+
29+
.rustlanges-card--resource:hover > svg {
30+
/* change the drop shadow color on hover but applying primary-500 */
31+
filter: drop-shadow(0px 0px 0px var(--color-primary-500)) drop-shadow(4px 4px 0px var(--color-primary-500));
32+
@apply stroke-primary-500;
2833
}
2934

3035
.rustlanges-card--resource-body {

styles/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@rustlanges/styles",
33
"private": false,
4-
"version": "0.0.9",
4+
"version": "0.0.10",
55
"type": "module",
66
"exports": {
77
".": "./tailwindcss.css",
@@ -32,7 +32,7 @@
3232
"directory": "styles"
3333
},
3434
"scripts": {
35-
"build": "npx @tailwindcss/cli -i tailwindcss.css -o dist/bundled.css --minify"
35+
"build": "npx @tailwindcss/cli -i tailwindcss.css -o /var/mnt/Basura/Projects/RustLangES.github.io/node_modules/@rustlanges/styles/dist/bundled.css --minify"
3636
},
3737
"peerDependencies": {
3838
"tailwindcss": "^4.1.8"

styles/theme.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@theme static {
22
/* ----- Breakpoints ----- */
3-
--breakpoint-desktop: 640px;
3+
--breakpoint-tablet: 40rem;
4+
--breakpoint-desktop: 80rem;
45

56
/* ------ Colors ------ */
67
--color-primary-50: #fff6ed;
@@ -96,6 +97,10 @@
9697
--text-body-bold--font-weight: 500;
9798
--text-body-bold--letter-spacing: 0em;
9899
--text-body-bold--line-height: 20px;
100+
--text-heading-4: 16px;
101+
--text-heading-4--font-weight: 400;
102+
--text-heading-4--letter-spacing: 0em;
103+
--text-heading-4--line-height: 28px;
99104
--text-heading-3: 18px;
100105
--text-heading-3--font-weight: 500;
101106
--text-heading-3--letter-spacing: 0em;
@@ -118,6 +123,7 @@
118123
--font-caption-bold: Inter;
119124
--font-body: Inter;
120125
--font-body-bold: Inter;
126+
--font-heading-4: Inter;
121127
--font-heading-3: Inter;
122128
--font-heading-2: Inter;
123129
--font-heading-1: Inter;

styles/utilities/container.css

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +0,0 @@
1-
@utility container {
2-
padding-left: 16px;
3-
padding-right: 16px;
4-
5-
@media (width >= theme(--breakpoint-sm)) {
6-
padding-left: calc((100vw + 16px - 640px) / 2);
7-
padding-right: calc((100vw + 16px - 640px) / 2);
8-
}
9-
10-
@media (width >= theme(--breakpoint-md)) {
11-
padding-left: calc((100vw + 16px - 768px) / 2);
12-
padding-right: calc((100vw + 16px - 768px) / 2);
13-
}
14-
15-
@media (width >= theme(--breakpoint-lg)) {
16-
padding-left: calc((100vw + 16px - 1024px) / 2);
17-
padding-right: calc((100vw + 16px - 1024px) / 2);
18-
}
19-
20-
@media (width >= theme(--breakpoint-xl)) {
21-
padding-left: calc((100vw + 16px - 1280px) / 2);
22-
padding-right: calc((100vw + 16px - 1280px) / 2);
23-
}
24-
25-
@media (width >= theme(--breakpoint-2xl)) {
26-
padding-left: calc((100vw + 16px - 1536px) / 2);
27-
padding-right: calc((100vw + 16px - 1536px) / 2);
28-
}
29-
}

0 commit comments

Comments
 (0)