Skip to content

Commit ebeec7b

Browse files
committed
Add necessary styles
1 parent 7fc2d3c commit ebeec7b

16 files changed

+424
-29
lines changed

src/scss/general/_button.scss

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
.button {
2+
border: 1px solid;
3+
4+
@include box(inline);
5+
@include font-weight(bold);
6+
@include radius(medium);
7+
@include transition(color, background-color, border-color);
8+
9+
&--medium {
10+
padding: 5px 16px;
11+
}
12+
13+
&--large {
14+
padding: 11px 24px;
15+
}
16+
17+
&--success {
18+
19+
@include color(tile);
20+
@include background(secondary);
21+
@include border-color(secondary);
22+
23+
&:hover {
24+
25+
@include background(secondary-alt);
26+
@include border-color(secondary-alt);
27+
}
28+
29+
&:focus {
30+
box-shadow: 0 0 0 3px rgba(113, 176, 47, 0.5);
31+
}
32+
}
33+
34+
&--info {
35+
36+
@include color(primary);
37+
@include background(tile);
38+
@include border-color(border);
39+
40+
&:hover {
41+
42+
@include color(tile);
43+
@include background(primary);
44+
@include border-color(primary);
45+
}
46+
47+
&:focus {
48+
box-shadow: 0 0 0 3px rgba(150, 88, 138, 0.5);
49+
}
50+
}
51+
}

src/scss/general/_colors.scss

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
@each $color in dark, tile, primary {
2+
.background-#{$color} {
3+
4+
@include background(#{$color});
5+
}
6+
}
7+
8+
@each $color in light, tile {
9+
.color-#{$color} {
10+
11+
@include color(#{$color});
12+
}
13+
}
14+
15+
.has-color {
16+
17+
a {
18+
color: inherit;
19+
}
20+
}

src/scss/general/_elements.scss

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
hr {
2+
margin: 0;
3+
border-style: solid;
4+
border-width: 1px 0 0;
5+
6+
@include border-color(border);
7+
}
8+
9+
.list-style-line {
10+
11+
@include box(wrap, middle);
12+
}
13+
14+
.list-style-none {
15+
padding: 0;
16+
margin: 0;
17+
18+
li {
19+
list-style: none;
20+
}
21+
}
22+
23+
.badge {
24+
margin: 0 12px 0 4px;
25+
display: inline-block;
26+
padding: 3px 5px;
27+
font-size: 75%;
28+
line-height: 1;
29+
30+
@include background(badge);
31+
@include radius(medium);
32+
}

src/scss/general/_index.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@import "button";
2+
@import "colors";
3+
@import "elements";
4+
@import "scaffolding";
5+
@import "spacing";
6+
@import "typography";

src/scss/general/_scaffolding.scss

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
.hide-visually {
2+
3+
@include hidden(visually);
4+
}
5+
6+
.hide-on-mobile {
7+
8+
@include mobile {
9+
10+
@include hidden();
11+
}
12+
}
13+
14+
.content-wrapper {
15+
max-width: 1140px;
16+
margin-inline: auto;
17+
}
18+
19+
.width-narrow {
20+
max-width: 915px;
21+
}
22+
23+
.width-medium {
24+
max-width: 845px;
25+
}
26+
27+
.width-small {
28+
max-width: 590px;
29+
}

src/scss/general/_spacing.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
@each $position in inline, block {
2+
3+
@each $size in normal, small {
4+
.padding-#{$position}-#{$size} {
5+
6+
@if $size == normal {
7+
padding-#{$position}: 24px;
8+
} @else {
9+
padding-#{$position}: 12px;
10+
}
11+
}
12+
}
13+
}

src/scss/general/_typography.scss

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
body {
2+
font-size: 16px;
3+
line-height: 1.5;
4+
margin: 0;
5+
6+
@include color(darker);
7+
@include background(background);
8+
@include font-family(primary);
9+
}
10+
11+
p {
12+
margin-top: 0;
13+
}
14+
15+
h1 {
16+
line-height: 1;
17+
margin: {
18+
top: 0;
19+
bottom: 24px;
20+
}
21+
font-size: clamp(55px, 3.5vw, 72px);
22+
23+
@include color(darker);
24+
@include font-weight(normal);
25+
}
26+
27+
.h2,
28+
h2 {
29+
font-size: clamp(40px, 3.5vw, 56px);
30+
line-height: 1.15;
31+
margin: {
32+
top: 0;
33+
bottom: clamp(18px, 3.5vw, 24px);
34+
}
35+
letter-spacing: 0.02em;
36+
37+
@include font-weight(normal);
38+
}
39+
40+
h3 {
41+
font-size: 24px;
42+
line-height: 1.25;
43+
margin: {
44+
top: 0;
45+
bottom: 20px;
46+
}
47+
letter-spacing: 0.02em;
48+
49+
@include font-weight(bold);
50+
}
51+
52+
a {
53+
text-decoration: none;
54+
55+
@include color(primary);
56+
@include transition(color, opacity);
57+
}
58+
59+
h4,
60+
.lg-txt {
61+
font-size: 24px;
62+
line-height: 1.25;
63+
margin: {
64+
top: 0;
65+
bottom: clamp(30px, 3.5vw, 48px);
66+
}
67+
font-weight: var(--bold);
68+
69+
@include font-weight(bold);
70+
}
71+
72+
h5 {
73+
font-size: 20px;
74+
line-height: 1.5;
75+
margin: {
76+
top: 0;
77+
bottom: 12px;
78+
}
79+
80+
@include font-weight(bold);
81+
}
82+
83+
small {
84+
font-size: 14px;
85+
margin-bottom: 24px;
86+
letter-spacing: 1px;
87+
display: block;
88+
}
89+
90+
.title {
91+
font-size: clamp(32px, 3.5vw, 40px);
92+
margin-top: 6px;
93+
}
94+
95+
.lead {
96+
font-size: 20px;
97+
}
98+
99+
p.bold + p {
100+
font-size: 14px;
101+
}
102+
103+
.small {
104+
font-size: 13px;
105+
}
106+
107+
.larger {
108+
font-size: 72px;
109+
line-height: 1.1;
110+
letter-spacing: 0.02em;
111+
}
112+
113+
.bold {
114+
115+
@include font-weight(bold);
116+
}
117+
118+
.italic {
119+
font-style: italic;
120+
}

src/scss/helpers/_index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import "mixins";

src/scss/helpers/_mixins.scss

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
@mixin font-family($name) {
2+
font-family: var(--font-family--#{$name});
3+
}
4+
5+
@mixin font-weight($name) {
6+
font-weight: var(--font-weight--#{$name});
7+
}
8+
9+
@mixin background($name) {
10+
background-color: var(--color--#{$name});
11+
}
12+
13+
@mixin border-color($name) {
14+
border-color: var(--color--#{$name});
15+
}
16+
17+
@mixin color($name) {
18+
color: var(--color--#{$name});
19+
}
20+
21+
@mixin radius($name) {
22+
border-radius: var(--radius--#{$name});
23+
}

src/scss/main/_cookiebanner.scss

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
.cookiebanner {
2+
width: min(1140px, 88vw);
3+
margin: 0 auto 24px;
4+
gap: 12px;
5+
border: 1px solid;
6+
7+
@include box(middle);
8+
@include border-color(border);
9+
@include radius(medium);
10+
11+
@include from-tablet {
12+
13+
&::before {
14+
content: "";
15+
background-image: url(../assets/images/cookie.svg);
16+
background-repeat: no-repeat;
17+
display: block;
18+
background-size: 34px;
19+
20+
@include square(34px);
21+
}
22+
}
23+
24+
25+
> span {
26+
flex: 1;
27+
28+
@include from-tablet {
29+
margin: 7px auto 7px 0;
30+
}
31+
32+
@include mobile {
33+
margin: 7px 12px;
34+
}
35+
}
36+
}

0 commit comments

Comments
 (0)