Skip to content

Commit e65a1c8

Browse files
committed
[LES-7.3(4)/compl] intro-to-sass
Working with "$, @mixin/include, nesting, &__". Worth noting: - features of this preprocessor. core: B-4 / WL-AL
1 parent 376e994 commit e65a1c8

File tree

4 files changed

+87
-4
lines changed

4 files changed

+87
-4
lines changed

core-courses/4-web-layout-advanced-level/7-pre-postprocessors/7-3(4)-intro-to-sass/index.html

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,17 @@
88
<link rel="stylesheet" href="./style.css">
99
</head>
1010

11-
<body>
12-
<h1>Lorem, ipsum dolor.</h1>
13-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Perferendis labore, iste reiciendis aperiam blanditiis
14-
dolore!</p>
11+
<body class="page">
12+
<div class="page__container">
13+
<h1 class="page__header">Lorem, ipsum dolor.</h1>
14+
<p class="page__text">Lorem ipsum dolor sit amet consectetur adipisicing elit. Perferendis labore, iste reiciendis
15+
aperiam blanditiis dolore!</p>
16+
</div>
17+
<section class="section page__section">
18+
<p class="section__text">Lorem ipsum, dolor sit amet consectetur adipisicing elit. Explicabo totam nisi, commodi vel
19+
repudiandae animi!</p>
20+
<span class="section__info">2025</span>
21+
</section>
1522
</body>
1623

1724
</html>

core-courses/4-web-layout-advanced-level/7-pre-postprocessors/7-3(4)-intro-to-sass/style.css

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core-courses/4-web-layout-advanced-level/7-pre-postprocessors/7-3(4)-intro-to-sass/style.css.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
$main-background: #f2f2f2;
2+
$main-color: lightcoral;
3+
4+
@mixin makeContainer {
5+
margin: 0 auto;
6+
padding: 20px;
7+
background: darken($color: $main-background, $amount: 10%);
8+
}
9+
10+
.page {
11+
font-family: sans-serif;
12+
font-size: 18px;
13+
color: $main-color;
14+
background: $main-background;
15+
16+
.page__header {
17+
color: darkred;
18+
}
19+
}
20+
21+
.page__container {
22+
@include makeContainer();
23+
}
24+
25+
.section {
26+
@include makeContainer();
27+
background: darken($color: $main-background, $amount: 15%);
28+
text-align: center;
29+
30+
&__text {
31+
text-shadow: 0 1px 1px lightslategray;
32+
}
33+
34+
&__info {
35+
font-weight: bold;
36+
font-size: 14px;
37+
color: darken($color: $main-color, $amount: 30%);
38+
}
39+
}

0 commit comments

Comments
 (0)