Skip to content

Commit 6b3e8f7

Browse files
committed
added project 10
1 parent 6a54b2e commit 6b3e8f7

File tree

2 files changed

+60
-2
lines changed

2 files changed

+60
-2
lines changed

FrontendMentor09—3-column-preview-card-component/README.md

+41-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ Frontend Mentor challenges help you improve your coding skills by building reali
1818
- [Author](#author)
1919
- [Acknowledgments](#acknowledgments)
2020

21-
2221
## Overview
2322

2423
### The challenge
@@ -58,10 +57,51 @@ Your users should be able to:
5857

5958
### What I learned
6059

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+
6165
### Code Highlights
6266

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+
63101
### Useful resources
64102

103+
- [SCSS mixin](https://sass-lang.com/documentation/at-rules/mixin/)
104+
65105
## Author
66106

67107
- Website - [Ranit Manik](https://ranitmanik.github.io/Portfolio-1.0)

index.html

+19-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
box-sizing: border-box;
3535
}
3636

37+
h1 {
38+
text-align: center;
39+
}
40+
3741

3842
/* --------------------------- main css --------------------------- */
3943

@@ -129,18 +133,30 @@
129133
}
130134

131135
@media screen and (min-width: 1300px) {
136+
body {
137+
padding-block: 5rem;
138+
}
139+
132140
main {
133141
grid-template-columns: 1fr 1fr 1fr;
134142
}
135143
}
136144

137145
@media screen and (max-width: 1300px) and (min-width: 900px) {
146+
body {
147+
padding-block: 3rem;
148+
}
149+
138150
main {
139151
grid-template-columns: 1fr 1fr;
140152
}
141153
}
142154

143155
@media screen and (max-width: 900px) {
156+
body {
157+
padding-block: 2rem;
158+
}
159+
144160
main {
145161
grid-template-columns: 1fr;
146162
}
@@ -150,6 +166,7 @@
150166
</head>
151167
<body>
152168

169+
<h1>FrontendMentor Challenges</h1>
153170
<main>
154171
<div class="card" role="article">
155172
<img src="FrontendMentor01—Blog-preview-card/design/desktop-design.jpg" alt="">
@@ -433,7 +450,8 @@ <h2>3-column preview card</h2>
433450
</p>
434451
<h2>Chat app CSS illustration</h2>
435452
<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.
437455
</p>
438456
<div class="card-author">
439457
<img src="https://avatars.githubusercontent.com/u/138437760?v=4"

0 commit comments

Comments
 (0)