File tree 2 files changed +60
-2
lines changed
FrontendMentor09—3-column-preview-card-component
2 files changed +60
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ Frontend Mentor challenges help you improve your coding skills by building reali
18
18
- [ Author] ( #author )
19
19
- [ Acknowledgments] ( #acknowledgments )
20
20
21
-
22
21
## Overview
23
22
24
23
### The challenge
@@ -58,10 +57,51 @@ Your users should be able to:
58
57
59
58
### What I learned
60
59
60
+ Today, I explored the practical application of SCSS ` mixins ` , focusing on their versatility in managing parameters. A
61
+ key
62
+ observation is the capability to modify arguments when utilizing mixins, thereby improving their adaptability in diverse
63
+ scenarios
64
+
61
65
### Code Highlights
62
66
67
+ - utilizing parameter and argument in ` mixin `
68
+
69
+ ``` scss
70
+ // mixin for card and btn
71
+ @mixin card ($card-primary-color ) {
72
+ background-color : $card-primary-color ;
73
+
74
+ .btn {
75
+ color : $card-primary-color ;
76
+ background-color : white ;
77
+
78
+ & :hover ,
79
+ & :focus ,
80
+ & :active {
81
+ color : white ;
82
+ background-color : transparent ;
83
+ outline : 2px solid white ;
84
+ }
85
+ }
86
+ }
87
+
88
+ .card :nth-child (1 ) {
89
+ @include card (var (--bright-orange ));
90
+ }
91
+
92
+ .card :nth-child (2 ) {
93
+ @include card (var (--dark-cyan ));
94
+ }
95
+
96
+ .card :nth-child (3 ) {
97
+ @include card (var (--very-dark-cyan ));
98
+ }
99
+ ```
100
+
63
101
### Useful resources
64
102
103
+ - [ SCSS mixin] ( https://sass-lang.com/documentation/at-rules/mixin/ )
104
+
65
105
## Author
66
106
67
107
- Website - [ Ranit Manik] ( https://ranitmanik.github.io/Portfolio-1.0 )
Original file line number Diff line number Diff line change 34
34
box-sizing : border-box;
35
35
}
36
36
37
+ h1 {
38
+ text-align : center;
39
+ }
40
+
37
41
38
42
/* --------------------------- main css --------------------------- */
39
43
129
133
}
130
134
131
135
@media screen and (min-width : 1300px ) {
136
+ body {
137
+ padding-block : 5rem ;
138
+ }
139
+
132
140
main {
133
141
grid-template-columns : 1fr 1fr 1fr ;
134
142
}
135
143
}
136
144
137
145
@media screen and (max-width : 1300px ) and (min-width : 900px ) {
146
+ body {
147
+ padding-block : 3rem ;
148
+ }
149
+
138
150
main {
139
151
grid-template-columns : 1fr 1fr ;
140
152
}
141
153
}
142
154
143
155
@media screen and (max-width : 900px ) {
156
+ body {
157
+ padding-block : 2rem ;
158
+ }
159
+
144
160
main {
145
161
grid-template-columns : 1fr ;
146
162
}
150
166
</ head >
151
167
< body >
152
168
169
+ < h1 > FrontendMentor Challenges</ h1 >
153
170
< main >
154
171
< div class ="card " role ="article ">
155
172
< img src ="FrontendMentor01—Blog-preview-card/design/desktop-design.jpg " alt ="">
@@ -433,7 +450,8 @@ <h2>3-column preview card</h2>
433
450
</ p >
434
451
< h2 > Chat app CSS illustration</ h2 >
435
452
< p class ="card-description ">
436
- Your challenge is to build out this feature illustration using HTML & CSS and get it looking as close to the design as possible.
453
+ Your challenge is to build out this feature illustration using HTML & CSS and get it looking as close to
454
+ the design as possible.
437
455
</ p >
438
456
< div class ="card-author ">
439
457
< img src ="https://avatars.githubusercontent.com/u/138437760?v=4 "
You can’t perform that action at this time.
0 commit comments