Skip to content

Commit d580188

Browse files
committed
Refactor achievement and counter styles to separate CSS files
Moved styles for AchievementItem and ItemWithCounter components from App.css and Cooking.css into dedicated CSS files under common/styles. Updated component imports to use the new CSS files, improving modularity and maintainability of styles.
1 parent e139fad commit d580188

6 files changed

Lines changed: 64 additions & 75 deletions

File tree

src/App.css

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -529,56 +529,3 @@ section.sv-container{
529529
}
530530

531531
}
532-
533-
.item-with-counter {
534-
display: block;
535-
position: relative;
536-
}
537-
538-
.item-with-counter p {
539-
text-decoration: none;
540-
color: white;
541-
font-weight: bold;
542-
text-shadow: 2px 2px 2px #000;
543-
544-
&.item-times {
545-
position: absolute;
546-
bottom: 5px;
547-
right: 0;
548-
}
549-
&.item-unknown {
550-
position: absolute;
551-
bottom: 50%;
552-
right: 50%;
553-
transform: translateX(50%) translateY(40%);
554-
555-
}
556-
}
557-
558-
.item-with-counter img {
559-
width: 2rem !important;
560-
height: 2rem !important;
561-
562-
&.done {
563-
filter: grayscale(0) brightness(1) !important;
564-
}
565-
&.known {
566-
filter: grayscale(1) opacity(0.3) !important;
567-
}
568-
&.unknown {
569-
filter: grayscale(1) brightness(0) opacity(0.3) !important;
570-
}
571-
}
572-
573-
.section-achievements img {
574-
width: 3rem !important;
575-
height: 3rem !important;
576-
}
577-
578-
.section-achievements img.achieved {
579-
filter: grayscale(0) brightness(1) !important;
580-
}
581-
582-
.section-achievements img.pending {
583-
filter: grayscale(1) brightness(0.5) !important;
584-
}

src/Components/AchieveTabs/Cooking/Cooking.css

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,4 @@
2424
position: absolute;
2525
bottom: 5px;
2626
right: 0;
27-
}
28-
29-
.achievement-item {
30-
display: flex;
31-
align-items: center;
32-
gap: 0.5rem;
33-
font-weight: bold;
34-
max-width: 30%;
35-
}
36-
37-
.section-achievements img {
38-
width: 3rem !important;
39-
height: 3rem !important;
40-
}
41-
42-
.section-achievements img.achieved {
43-
filter: grayscale(0) brightness(1) !important;
44-
}
45-
46-
.section-achievements img.pending {
47-
filter: grayscale(1) brightness(0.5) !important;
4827
}

src/Components/common/AchievementItem.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import "./styles/AchievementIte.css";
2+
13
type AchievementItemProps = {
24
done: boolean;
35
image: string;

src/Components/common/ItemWithCounter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
import './styles/ItemWithCounter.css';
22
type ItemWithCounterProps = {
33
link: string;
44
src: string;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.achievement-item {
2+
display: flex;
3+
align-items: center;
4+
gap: 0.5rem;
5+
font-weight: bold;
6+
max-width: 30%;
7+
}
8+
9+
.achievement-item img {
10+
width: 3rem !important;
11+
height: 3rem !important;
12+
}
13+
14+
.achievement-item img.achieved {
15+
filter: grayscale(0) brightness(1) !important;
16+
}
17+
18+
.achievement-item img.pending {
19+
filter: grayscale(1) brightness(0.5) !important;
20+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
2+
3+
.item-with-counter {
4+
display: block;
5+
position: relative;
6+
}
7+
8+
.item-with-counter p {
9+
text-decoration: none;
10+
color: white;
11+
font-weight: bold;
12+
text-shadow: 2px 2px 2px #000;
13+
14+
&.item-times {
15+
position: absolute;
16+
bottom: 5px;
17+
right: 0;
18+
}
19+
&.item-unknown {
20+
position: absolute;
21+
bottom: 50%;
22+
right: 50%;
23+
transform: translateX(50%) translateY(40%);
24+
25+
}
26+
}
27+
28+
.item-with-counter img {
29+
width: 2.5rem !important;
30+
height: 2.5rem !important;
31+
32+
&.done {
33+
filter: grayscale(0) brightness(1) !important;
34+
}
35+
&.known {
36+
filter: grayscale(1) opacity(0.3) !important;
37+
}
38+
&.unknown {
39+
filter: grayscale(1) brightness(0) opacity(0.3) !important;
40+
}
41+
}

0 commit comments

Comments
 (0)