exadel-inc/esl

View on GitHub
packages/esl-website/src/landing/newsline/newsline.less

Summary

Maintainability
Test Coverage
@import (reference) '../../common/variables.less';
 
@import './newsline-stars.less';
 
.newsline {
position: relative;
margin: 0 auto 10rem;
 
&-more-trigger {
display: block;
text-align: center;
}
& &-list-container {
display: block;
}
&-list-container:not([open]) &-more-item {
display: none;
}
 
&-list {
display: flex;
flex-direction: column;
}
 
&-item {
position: relative;
list-style: none;
}
 
&-link {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
}
 
&-content {
padding: 1.5rem 1rem 1.5rem 3rem;
@media @sm-xl {
padding: 1.5rem 5rem;
}
 
color: white;
border-left: 3px solid white;
transition: border-color 0.25s ease-in-out;
 
&::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: linear-gradient(
to right,
fade(@nav-dark-selected, 15%),
fade(@nav-dark-selected, 0%)
);
pointer-events: none;
opacity: 0;
transition: opacity 0.25s ease-in-out;
}
 
& &-title {
font-size: 1.5rem;
margin-left: -1px;
margin-bottom: 1rem;
}
& &-emoji {
position: absolute;
transform: translateX(-100%);
margin-left: -0.4rem;
@media @sm-xl {
margin-left: -0.8rem;
}
}
& &-date {
display: block;
font-size: 0.85rem;
margin-top: 0.4rem;
opacity: 0.75;
}
 
& &-text {
font-size: 1.1rem;
line-height: 1.6em;
 
a[href] {
position: relative;
z-index: 2;
}
 
code {
color: @primary-blue;
}
 
// h1-h3 are not allowed in content of the newsline
h1,
h2,
h3 {
display: none;
}
 
h4,
.h4 {
font-size: 1.2rem;
}
h5,
.h5 {
font-size: 1.1rem;
}
p {
margin-bottom: 0.2rem;
}
}
}
 
&-item:hover &-content {
border-color: @nav-dark-accent;
&::before {
opacity: 1;
}
}
}