Readapt the misuse of BEM, Code organization

- -- is only for a modifier, not a child "child". Use master__child without the parent__ in it to make it more readable.
https://www.smashingmagazine.com/2016/06/battling-bem-extended-edition-common-problems-and-how-to-avoid-them/
- Redefine atom design components
This commit is contained in:
2020-02-29 18:32:32 +01:00
parent 70ce97e9bc
commit 76c8c31c89
17 changed files with 387 additions and 391 deletions

View File

@@ -0,0 +1,104 @@
// Pagination
.pagination {
position: relative;
padding: 64px 0 72px;
background-color: $color-tertiary;
text-align: center;
@include breakpoint (sm) {
padding: pxVW(176) 0 pxVW(120);
}
@include breakpoint (xl) {
padding: 176px 0 120px;
}
// Pages
&__page {
position: relative;
display: inline-flex;
justify-content: center;
align-items: center;
margin: 0 auto;
font-family: $font-serif-extra;
font-size: rem(72px);
color: rgba($color-text, 0.15);
line-height: 1;
cursor: pointer;
transition: color 250ms $ease-cubic;
@include breakpoint (sm) {
font-size: rem(160px);
}
// Hover
&:hover {
color: rgba($color-text, 0.25);
}
}
// Numbers
&__numbers {
overflow: hidden;
height: 62px;
margin-right: 4px;
@include breakpoint (sm) {
height: 136px;
}
.scroll {
display: flex;
flex-direction: column;
transform: translate(0, 0);
text-align: right;
line-height: 0.85;
transition: transform 325ms $ease-cubic;
will-change: transform;
}
}
// Info
&__info {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -72%);
font-family: $font-serif;
font-size: 18px;
color: $color-secondary-bright;
@include breakpoint (sm) {
font-size: rem(40px);
}
}
// Caption
&__caption {
max-width: 420px;
margin: 0 auto;
font-size: 10px;
color: $color-lightgray;
letter-spacing: 2px;
line-height: 1.6;
@include breakpoint (sm) {
font-size: 14px;
}
}
// Message
&__message {
padding: pxVW(40) 0;
h3 {
font-family: $font-serif;
font-size: rem(32px);
color: $color-secondary;
margin-bottom: 16px;
@include breakpoint (sm) {
font-size: rem(40px);
}
}
}
}