Skip to content

Commit 6e3bc86

Browse files
committed
Refactor SkillContainer styles and add CSS types
Moved SkillContainer styles from App.css to a dedicated SkillContainer.css file with improved structure and responsiveness. Added a css.d.ts type declaration for CSS module support.
1 parent 0281ffc commit 6e3bc86

3 files changed

Lines changed: 115 additions & 36 deletions

File tree

src/App.css

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -339,42 +339,6 @@ section.sv-container{
339339
justify-content: center;
340340
}
341341

342-
.skill-container{
343-
position: relative;
344-
width: 28%;
345-
height: 42%;
346-
margin: 1%;
347-
padding: 1%;
348-
background: url('./Media/Windows/Window7.png') no-repeat center center;
349-
-webkit-background-size: cover;
350-
-moz-background-size: cover;
351-
-o-background-size: cover;
352-
background-size: 100% 100%;
353-
}
354-
.skill-container h1{
355-
font-size: 1.5em;
356-
text-align: center;
357-
}
358-
359-
.skill-container img{
360-
position: absolute;
361-
bottom: 15px;
362-
left: 20px;
363-
width: 40px;
364-
height: 40px;
365-
cursor: help;
366-
}
367-
368-
.skill-container span{
369-
display: flex;
370-
justify-content: center;
371-
padding-top: 1rem;
372-
font-size: 1.25em;
373-
width: 100%;
374-
height: 80%;
375-
line-height: 1.5em;
376-
377-
}
378342
.a-title{
379343
width: 100%;
380344
align-items: center;
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
/* SkillContainer Component Styles */
2+
.skill-container {
3+
position: relative;
4+
width: 28%;
5+
height: auto;
6+
margin: 1%;
7+
padding: 1%;
8+
-webkit-background-size: cover;
9+
-moz-background-size: cover;
10+
-o-background-size: cover;
11+
background-size: 100% 100%;
12+
display: flex;
13+
flex-direction: column;
14+
align-items: center;
15+
justify-content: space-between;
16+
border-image: url(/src/Media/Windows/Window5.png) 2 fill stretch;
17+
border-style: solid;
18+
image-rendering: pixelated;
19+
border-width: 4px;
20+
}
21+
22+
.skill-container__title {
23+
font-size: 1.5em;
24+
text-align: center;
25+
margin: 0;
26+
padding: 0.25rem;
27+
color: #000;
28+
font-weight: bold;
29+
position: absolute;
30+
top: -15%;
31+
background-size: 100% 100%;
32+
display: flex;
33+
flex-direction: column;
34+
align-items: center;
35+
justify-content: space-between;
36+
border-image: url(/src/Media/Windows/Window5.png) 5 fill stretch;
37+
border-width: 6px;
38+
border-style: solid;
39+
image-rendering: pixelated;
40+
}
41+
42+
.skill-container__stats {
43+
display: flex;
44+
flex-direction: column;
45+
justify-content: center;
46+
align-items: center;
47+
padding-top: 1rem;
48+
font-size: 1.25em;
49+
width: 100%;
50+
height: 80%;
51+
line-height: 1.5em;
52+
text-align: center;
53+
}
54+
55+
.skill-container__stats-line {
56+
margin: 0.2rem 0;
57+
}
58+
59+
.skill-container__icon {
60+
position: absolute;
61+
bottom: -12px;
62+
left: -12px;
63+
width: 40px;
64+
height: 40px;
65+
cursor: help;
66+
transition: transform 0.2s ease-in-out;
67+
}
68+
69+
.skill-container__icon:hover {
70+
transform: scale(1.1);
71+
}
72+
73+
/* Responsive adjustments */
74+
@media (max-width: 768px) {
75+
.skill-container {
76+
width: 45%;
77+
height: 200px;
78+
margin: 2%;
79+
}
80+
81+
.skill-container__title {
82+
font-size: 1.2em;
83+
}
84+
85+
.skill-container__stats {
86+
font-size: 1em;
87+
}
88+
}
89+
90+
@media (max-width: 480px) {
91+
.skill-container {
92+
width: 90%;
93+
height: 180px;
94+
margin: 5% auto;
95+
}
96+
97+
.skill-container__title {
98+
font-size: 1em;
99+
}
100+
101+
.skill-container__stats {
102+
font-size: 0.9em;
103+
}
104+
105+
.skill-container__icon {
106+
width: 30px;
107+
height: 30px;
108+
bottom: 10px;
109+
left: 15px;
110+
}
111+
}

src/types/css.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
declare module '*.css' {
2+
const content: any;
3+
export default content;
4+
}

0 commit comments

Comments
 (0)